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.
Differential D8833
[lib] Introduce chat mention candidates getters • patryk on Aug 16 2023, 4:28 AM. Authored by Tags None Referenced Files
Details
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. Use useChatMentionCandidatesObj in web/chat/chat.react.js and check if data structure is valid:
Example: Thread store:
Valid object:
Diff Detail
Event TimelineComment Actions Answers for potential questions:
To obtain UI thread name, we need to use useResolvedThreadInfosObj hook to convert ThreadInfo to ResolvedThreadInfo.
Basic idea is to group chats within the same community. For GENESIS chats, we want to group them by first child of GENESIS. To achieve that, we need to do DFS on our “thread tree”.
Comment Actions If I understand correctly, your structure will for every chat in a community contain an almost identical object: an object of all chats from this community excluding the one that is the key. This is very memory inefficient. @tomek suggested that you connect to the production keyserver that likely has a bigger database than your local setup to test your solution. Also - what happens when someone tries to mention a chat in GENESIS?
|