mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-16 17:30:45 +08:00
feat(context-enhancement): 新增 chatId 与 threadId 来源字段 (#128)
Add chatId and threadId source fields across all nine IM channels, update UI/docs/tests, reconcile the latest main branch, and credit @Chan-0312 as a contributor.
This commit is contained in:
parent
3c71712962
commit
3562b9244e
19 changed files with 266 additions and 158 deletions
|
|
@ -172,6 +172,10 @@ export function normalizeSlackEvent(payload, botUserId, {
|
|||
senderIsBot: String(event.user) === String(botUserId),
|
||||
kind: direct ? 'direct' : 'group',
|
||||
conversationId: direct ? String(event.channel) : `${event.channel}:${threadTs}`,
|
||||
contextSource: () => ({
|
||||
chatId: String(event.channel),
|
||||
threadId: event.thread_ts ? String(event.thread_ts) : undefined,
|
||||
}),
|
||||
content: stripBotMention(event.text ?? '', botUserId),
|
||||
plainText: !Array.isArray(event.files) || event.files.length === 0,
|
||||
images: Array.isArray(event.files)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue