[keyserver] Attach a threadID to each media (image/video) upload
Summary:
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
Test Plan:
Upload several media (images and videos) and check the uploads table to confirm that the thread column is populated. Both web and native were successful. Tested the following scenarios:
- Upload a single media on web and native
- Upload multiple media on web
- Use the queue feature to upload multiple media on native
- Tested with both videos and photos
Reviewers: atul, ginsu, tomek, kamil, ashoat
Reviewed By: ashoat
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D6482