there are a lot of cases in this function.

I really think having separate constructors `Thread.fromMessage`, `Thread.fromDraft` would be a lot more readable in the end. And probably more efficient (more linear code, less if blocks).