We need to attach a thread id to each upload that is made. The best way to do this would be on the keyserver, as this gives us the flexibility of shareable code betweewn the web and native clients. This also means we don't need to propagate the thread id from the individual clients to the keyserver.
Originally, I planned to put this query in message-creator, as mentioned in the Linear task. However, this seemed to cause some problems where the query was being executed prior to a container being assigned to an upload, thus the query found no results. To resolve this, I looked around for where we assign a container to each upload, and thought that this would be the best place to attach a thread to each upload.
Depends on D6467
https://linear.app/comm/issue/ENG-2871/attach-a-threadid-to-each-media-imagevideo-upload