Page MenuHomePhabricator

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

Authored by ashoat on Jul 16 2023, 4:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jul 7, 9:42 AM
Unknown Object (File)
Sat, Jul 6, 5:52 AM
Unknown Object (File)
Fri, Jul 5, 3:26 AM
Unknown Object (File)
Thu, Jul 4, 7:10 PM
Unknown Object (File)
Thu, Jul 4, 7:09 PM
Unknown Object (File)
Thu, Jul 4, 12:08 PM
Unknown Object (File)
Thu, Jul 4, 12:08 PM
Unknown Object (File)
Tue, Jul 2, 11:08 AM
Subscribers
None

Details

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

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

keyserver/src/scripts/add-thread-ancestry.js
30 ↗(On Diff #28708)

I deleted this script rather than refactoring this callsite since I don't anticipate we'll need to use it again

keyserver/src/scripts/soft-launch-migration.js
54 ↗(On Diff #28708)

I deleted this script rather than refactoring this callsite since I don't anticipate we'll need to use it again

This revision is now accepted and ready to land.Jul 17 2023, 4:07 AM