HomePhabricator
Diffusion Comm be43778193f8

[keyserver] Attach a threadID to each media (image/video) upload

Description

[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:

  1. Upload a single media on web and native
  2. Upload multiple media on web
  3. Use the queue feature to upload multiple media on native
  4. Tested with both videos and photos

Screenshot 2023-02-02 at 9.44.15 AM.png (686×1 px, 436 KB)

Reviewers: atul, ginsu, tomek, kamil, ashoat

Reviewed By: ashoat

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D6482

Details

Provenance
rohanAuthored on Feb 2 2023, 6:46 AM
Reviewer
ashoat
Differential Revision
D6482: [keyserver] Attach a threadID to each media (image/video) upload
Parents
rCOMM6e2f92634d55: [native] Render the media gallery in the thread settings on native
Branches
Unknown
Tags
Unknown