discourse/plugins/chat/spec
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
..
components/chat DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
fabricators DEV: chat streaming (#25736) 2024-02-20 09:49:19 +01:00
integration PERF: Reduce overhead from chat message excerpt (#26712) 2024-04-25 14:29:00 +02:00
jobs DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
lib DEV: adds first_messages/last_messages to thread SDK (#26861) 2024-05-03 17:30:39 +02:00
mailers DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
models FEATURE: encourage users to set chat thread titles (#26617) 2024-04-29 17:20:01 +08:00
policies/chat/channel DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
queries/chat DEV: adds first_messages/last_messages to thread SDK (#26861) 2024-05-03 17:30:39 +02:00
requests FEATURE: encourage users to set chat thread titles (#26617) 2024-04-29 17:20:01 +08:00
serializer FIX: add excerpt fallback for chat message replies (#26834) 2024-05-01 16:39:47 +02:00
services DEV: adds first_messages/last_messages to thread SDK (#26861) 2024-05-03 17:30:39 +02:00
support DEV: Move chat service objects into core (#26506) 2024-04-04 10:57:41 -03:00
system FIX: ensures last read is updated on new message (#26772) 2024-04-26 18:27:39 +02:00
validators DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00
plugin_helper.rb PERF: Reduce overhead from chat message excerpt (#26712) 2024-04-25 14:29:00 +02:00
plugin_spec.rb DEV: Remove unnecessary rails_helper requiring (#26364) 2024-03-26 11:32:01 +01:00