HomePhabricator
Diffusion Comm 5834356687a4

[keyserver] Add function for fetching messages matching search query

Description

[keyserver] Add function for fetching messages matching search query

Summary:
issue: https://linear.app/comm/issue/ENG-3317/implement-fetching-messages-based-on-the-query
I'm using the same cursor pattern as we use in fetchMessageInfos(fetchMessagesBeforeCursor), fetchErrorReportInfos
Joining with messages m2 is used to fetch the message a sidebar_source is pointing to.

Test Plan:
Called this function from createMessages and checked that it returns messages matching the provided pattern, from the given thread. Checked that it returns correct related messages, especially for the
message that is the first message in a sidebar.

Reviewers: kamil, bartek, ashoat

Reviewed By: bartek, ashoat

Subscribers: ashoat, tomek, atul

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

Details