feat(mattermost): add thread_replies config and typing indicator
Add two Mattermost channel enhancements: 1. thread_replies config option (default: false) - When false, replies go to the channel root instead of threading. - When true, replies thread on the original post. - Existing thread replies always stay in-thread regardless of setting. 2. Typing indicator (start_typing/stop_typing) - Implements the Channel trait's typing methods for Mattermost. - Fires POST /api/v4/users/me/typing every 4s in a background task. - Supports parent_id for threaded typing indicators. - Aborts cleanly on stop_typing via JoinHandle. Updated all MattermostChannel::new call sites (start_channels, scheduler) and added 9 unit tests covering thread routing and edge cases.
This commit is contained in:
parent
41c3e62dad
commit
58120b1c69
4 changed files with 143 additions and 13 deletions
|
|
@ -1499,6 +1499,10 @@ pub struct MattermostConfig {
|
|||
pub channel_id: Option<String>,
|
||||
#[serde(default)]
|
||||
pub allowed_users: Vec<String>,
|
||||
/// When true, replies thread on the original post. When false (default),
|
||||
/// replies go to the channel root.
|
||||
#[serde(default)]
|
||||
pub thread_replies: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue