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
F3386868: D8513.diff
Fri, Nov 29, 6:35 AM
Unknown Object (File)
Sat, Nov 23, 2:29 PM
Unknown Object (File)
Sat, Nov 23, 12:49 PM
Unknown Object (File)
Sat, Nov 23, 7:16 AM
Unknown Object (File)
Sun, Nov 3, 11:39 PM
Unknown Object (File)
Oct 27 2024, 2:05 PM
Unknown Object (File)
Oct 27 2024, 2:05 PM
Unknown Object (File)
Oct 27 2024, 2:05 PM
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