HomePhabricator
Diffusion Comm 07be3385ef50

[lib] Introduce chat mention candidates getters

Description

[lib] Introduce chat mention candidates getters

Summary:
Solution for ENG-4551.

This diff introduces a custom data structure for chat mentions. We require this type of data structure to efficiently retrieve potential chat mention candidates.

Test Plan:
Use useChatMentionCandidatesObj in web/chat/chat.react.js and check if data structure is valid:

  • Object keys should contain all ids available in redux store
  • Each object value should be another object with threadID as keys and ResolvedThreadInfo as value.
    • This inner object should contain threadIDs within the community without key (= threadID)
    • Check GENESIS chats if they contain only chats that are inside the top level that is below GENESIS.

Example:

Thread store:

  • GENESIS
    • chat1
      • chat1.1
    • chat2
  • Test community
    • chat3
      • chat5
    • chat4

Valid object:
{chat1: {chat1.1}, {chat2: {}}, Test community: {chat3, chat5, chat4}, chat3: {Test community, chat4, chat5}, ...}

Reviewers: tomek, inka

Reviewed By: inka

Subscribers: ashoat, tomek

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

Details

Provenance
patrykAuthored on Sep 1 2023, 2:41 AM
Reviewer
inka
Differential Revision
D8833: [lib] Introduce chat mention candidates getters
Parents
rCOMM0762a9a66f57: [client-backup] implement functions to decrypt backup
Branches
Unknown
Tags
Unknown