mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-10-16 06:59:02 +08:00
Add session_mode ("user" | "thread") to IM channel config. In thread
mode, each message thread gets its own session, enabling multi-user
collaboration within the same thread context.
Backend:
- Add SessionMode type constants and validation
- Add ThreadID field to IncomingMessage and ChannelSession
- Split resolveSession into resolveUserSession/resolveThreadSession
- Update makeUserKey to include threadID only in thread mode
- Extract ThreadID in Slack, Mattermost, Feishu, Telegram adapters
- Add message_thread_id to Telegram SendReply/StartStream for Forums
- DB migration 000028: session_mode column + thread_id column + index
Frontend:
- Add session_mode radio group to IMChannelPanel dialog
- Auto-reset session_mode when switching to non-thread platform
- Show thread badge on channel card for thread-mode channels
- Add i18n keys for en-US, ko-KR, zh-CN, ru-RU
9 lines
420 B
SQL
9 lines
420 B
SQL
DO $$ BEGIN RAISE NOTICE '[Migration 000028] Rolling back thread session support'; END $$;
|
|
|
|
DROP INDEX IF EXISTS idx_channel_thread_lookup;
|
|
ALTER TABLE im_channel_sessions DROP COLUMN IF EXISTS thread_id;
|
|
ALTER TABLE im_channels DROP CONSTRAINT IF EXISTS chk_im_channels_session_mode;
|
|
ALTER TABLE im_channels DROP COLUMN IF EXISTS session_mode;
|
|
|
|
DO $$ BEGIN RAISE NOTICE '[Migration 000028] Rollback completed'; END $$;
|