mirror of
https://github.com/discourse/discourse.git
synced 2024-12-23 19:36:27 +08:00
671e6066bf
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. |
||
---|---|---|
.. | ||
app | ||
assets | ||
config | ||
db | ||
lib | ||
public | ||
spec | ||
test/javascripts | ||
plugin.rb | ||
README.md |
This plugin is still in active development and may change frequently
Documentation
The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.
For user documentation, see Discourse Chat.
For developer documentation, see Discourse Documentation.