fix: reset conversation history on fresh @-mention to prevent context bleed
This commit is contained in:
@@ -162,7 +162,9 @@ func (p *Plugin) MessageHasBeenPosted(c *plugin.Context, post *model.Post) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wake or refresh the engagement session.
|
// Wake or refresh the engagement session.
|
||||||
|
// Fresh @-mention resets conversation history so old context doesn't bleed.
|
||||||
if mentioned {
|
if mentioned {
|
||||||
|
_ = p.conversationStore.Reset(post.UserId, post.ChannelId)
|
||||||
p.engagementEngine.Wake(post.UserId, post.ChannelId)
|
p.engagementEngine.Wake(post.UserId, post.ChannelId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user