HomePhabricator
Diffusion Comm be20228367d2

[keyserver] Update fetchPinnedMessageInfos to retrieve related messages

Description

[keyserver] Update fetchPinnedMessageInfos to retrieve related messages

Summary:
Update fetchPinnedMessageInfos to now retrieve the related messages (reactions, edits, etc.) using the new function. The ongoing native stack can rebase these changes once landed so no additional work will be needed there.

One point of discussion is whether the use of messageListData is still needed. I'm under the impression, after some investigation, that it is necessary still since we need to construct ChatMessageInfoItems from all of the message infos. The only change this diff should help with is preventing missing related messages for ones not accessible from messageStore.

I'll continue confirming if this is the case locally, however, in the meantime and am open to discussion

Test Plan:
Confirm that related messages are fetched directly now.

Through the console:

[
  {
    type: 0,
    id: '85555',
    threadID: '85545',
    time: 1679763761385,
    creatorID: '256',
    text: 'Sample new thread'
  },
  {
    type: 19,
    id: '90779',
    threadID: '85545',
    time: 1683401422863,
    creatorID: '256',
    targetMessageID: '85555',
    reaction: '👍',
    action: 'add_reaction'
  }
]

Also confirmed via the thread pinned messages modal on web, with a before and after to show the reaction for a message from several months ago now appears after these changes.

Before:

Screenshot 2023-05-06 at 4.07.09 PM.png (1×1 px, 286 KB)

After:

Screenshot 2023-05-06 at 4.07.37 PM.png (1×1 px, 286 KB)

Reviewers: ashoat, inka, atul

Reviewed By: ashoat

Subscribers: tomek, atul

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