[ENG-10856](https://linear.app/comm/issue/ENG-10856/update-getinitialmessages-to-support-multiple-tables).
Cleaner but a lot slower solution in D14851 (this is just an alternative). Some context about the investigation in [this comment](https://linear.app/comm/issue/ENG-9787/update-functions-that-read-from-the-db-to-be-aware-of-thread-thickness#comment-6a628ea0)
Depends on D14850