HomePhabricator
Diffusion Comm 2589080b2417

[keyserver] Replace raw SQL predicate to fetchThreadInfos with filter object

Description

[keyserver] Replace raw SQL predicate to fetchThreadInfos with filter object

Summary:
In future diffs, we're going to need to change how some filters are constructed based on the presence of other filters. In particular, if we are filtering for a particular user's visible threads, we'll want to apply further threadID filters as mm.thread IN rather than t.id IN.

To reduce the complexity of building these filters at the callsite, I'm replacing them with a filter object, and moving the responsibility of building the WHERE clause to fetchServerThreadInfos and fetchThreadInfos.

Depends on D8512

Test Plan: I made sure that I was able to load the website in my local dev environment, and that threads appeared to show up in chat

Reviewers: tomek, atul

Reviewed By: tomek

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

Details