EmbeddedChat icon indicating copy to clipboard operation
EmbeddedChat copied to clipboard

Fix: Include pinned messages from threads in the main chat interface

Open smritidoneria opened this issue 1 year ago • 3 comments

Brief Title

This pull request addresses the issue where pinned messages in threads do not appear in the main chat interface. The solution involves fetching pinned messages from both the main chat and threads and combining them to ensure they are all displayed in the main chat interface.

Fixes #853

Video/Screenshots

https://github.com/user-attachments/assets/b7de966d-7cb9-4295-9d0d-d5c5297c4c73

PR Test Details

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-<pr_number> after approval. Contributors are requested to replace <pr_number> with the actual PR number.

smritidoneria avatar Jan 09 '25 16:01 smritidoneria

Done

smritidoneria avatar Jan 10 '25 08:01 smritidoneria

Sorting can be time-consuming if there are a large number of pinned messages. However, to maintain consistency with Rocket.Chat, I have implemented sorting since pinned messages in Rocket.Chat are sorted.

Alternatively, we have two other approaches:

Implement pagination to fetch messages dynamically as the user scrolls to the bottom of the interface, ensuring only the required messages are loaded. Fetch messages directly from the server without sorting them at all. Which approach do you think would be best, @Spiral-Memory?

smritidoneria avatar Feb 03 '25 12:02 smritidoneria

hey @Spiral-Memory , can you please take a look at this and let me know which approach would be suitable?

smritidoneria avatar Mar 02 '25 06:03 smritidoneria