mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
feat(channel): pass conversation type through to agent gateway and persist in route
Propagate conversation type (direct/group/thread) from channel adapters all the way to the agent prompt. Store conversation_type on bot_channel_routes so the bot knows whether a message originates from a p2p chat, group, or thread. Schema changes are folded into the 0001 init migration (destructive update).
This commit is contained in:
@@ -122,6 +122,7 @@ type gatewayIdentity struct {
|
||||
ChannelIdentityID string `json:"channelIdentityId"`
|
||||
DisplayName string `json:"displayName"`
|
||||
CurrentPlatform string `json:"currentPlatform,omitempty"`
|
||||
ConversationType string `json:"conversationType,omitempty"`
|
||||
SessionToken string `json:"sessionToken,omitempty"`
|
||||
}
|
||||
|
||||
@@ -270,6 +271,7 @@ func (r *Resolver) resolve(ctx context.Context, req conversation.ChatRequest) (r
|
||||
ChannelIdentityID: strings.TrimSpace(req.SourceChannelIdentityID),
|
||||
DisplayName: r.resolveDisplayName(ctx, req),
|
||||
CurrentPlatform: req.CurrentChannel,
|
||||
ConversationType: strings.TrimSpace(req.ConversationType),
|
||||
SessionToken: req.ChatToken,
|
||||
},
|
||||
Attachments: []any{},
|
||||
|
||||
Reference in New Issue
Block a user