fix: harden message hook session/group context and add integration coverage (#9859) (thanks @Drickon)

This commit is contained in:
Peter Steinberger
2026-03-02 22:34:27 +00:00
parent b5102ba4f9
commit 29dde80c3e
9 changed files with 310 additions and 46 deletions

View File

@@ -299,6 +299,30 @@ Message events include rich context about the message:
accountId?: string, // Provider account ID
conversationId?: string, // Chat/conversation ID
messageId?: string, // Message ID returned by the provider
isGroup?: boolean, // Whether this outbound message belongs to a group/channel context
groupId?: string, // Group/channel identifier for correlation with message:received
}
// message:transcribed context
{
body?: string, // Raw inbound body before enrichment
bodyForAgent?: string, // Enriched body visible to the agent
transcript: string, // Audio transcript text
channelId: string, // Channel (e.g., "telegram", "whatsapp")
conversationId?: string,
messageId?: string,
}
// message:preprocessed context
{
body?: string, // Raw inbound body
bodyForAgent?: string, // Final enriched body after media/link understanding
transcript?: string, // Transcript when audio was present
channelId: string, // Channel (e.g., "telegram", "whatsapp")
conversationId?: string,
messageId?: string,
isGroup?: boolean,
groupId?: string,
}
```