Page MenuHomePhabricator

[keyserver] Update fetchPinnedMessageInfos to retrieve related messages
ClosedPublic

Authored by rohan on May 6 2023, 1:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 13, 12:41 AM
Unknown Object (File)
Thu, Apr 11, 12:46 PM
Unknown Object (File)
Thu, Apr 11, 12:46 PM
Unknown Object (File)
Mar 27 2024, 11:53 PM
Unknown Object (File)
Feb 19 2024, 1:14 AM
Unknown Object (File)
Feb 19 2024, 12:56 AM
Unknown Object (File)
Feb 18 2024, 11:08 PM
Unknown Object (File)
Feb 18 2024, 7:15 PM
Subscribers

Details

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)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rohan edited the test plan for this revision. (Show Details)
rohan added a reviewer: atul.
rohan edited the test plan for this revision. (Show Details)
rohan requested review of this revision.May 6 2023, 1:38 PM
This revision is now accepted and ready to land.May 7 2023, 8:14 AM