We create a function in `upload-fetchers` to query the database for uploads given a specific threadID. The query uses a UNION to join two select statements, one for the photos and one for the videos. We get the necessary information for both media, and for the `thumbnail` data for videos, the photos are defaulted to `NULL`.
https://linear.app/comm/issue/ENG-2873/create-a-function-to-query-for-all-uploads-from-a-provided-thread
Depends on D6482