discourse/plugins/chat/app/queries/chat
Joffrey JAFFEUX 671e6066bf
DEV: adds first_messages/last_messages to thread SDK (#26861)
This commit introduces several enhancements to the ChatSDK module, aiming to improve the functionality and usability of chat thread interactions. Here's what has been changed and added:

1. **New Method: `first_messages`:**
   - Added a method to retrieve the first set of messages from a specified chat thread.
   - This method is particularly useful for fetching initial messages when entering a chat thread.
   - Parameters include `thread_id`, `guardian`, and an optional `page_size` which defaults to 10.
   - Usage example added to demonstrate fetching the first 15 messages from a thread.

2. **New Method: `last_messages`:**
   - Added a method to retrieve the last set of messages from a specified chat thread.
   - This method supports reverse pagination, where the user may want to see the most recent messages first.
   - Similar to `first_messages`, it accepts `thread_id`, `guardian`, and an optional `page_size` parameter, defaulting to 10.
   - Usage example provided to illustrate fetching the last 20 messages from a thread.
2024-05-03 17:30:39 +02:00
..
channel_memberships_query.rb FEATURE: introduces group channels (#24288) 2023-11-10 11:29:28 +01:00
channel_unreads_query.rb DEV: Chat API channel#show changes for threading (#21632) 2023-05-22 13:59:46 +02:00
messages_query.rb DEV: adds first_messages/last_messages to thread SDK (#26861) 2024-05-03 17:30:39 +02:00
thread_participant_query.rb FIX: handle thread participants limit on the frontend (#23839) 2023-10-09 14:04:59 +08:00
thread_unreads_query.rb FEATURE: allows to force a thread (#25987) 2024-03-06 12:03:42 +01:00
tracking_state_report_query.rb FEATURE: Show unread in sidebar for unread channel threads (#22342) 2023-07-17 13:00:49 +10:00
users_from_usernames_and_groups_query.rb FIX: allows to query a username made of integers (#25815) 2024-02-22 14:53:47 +01:00