fix: sanitize profile updates before storing in chat memory pipeline

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 22:00:04 -05:00
parent c5316b98d1
commit b7076dffe2

View File

@@ -171,6 +171,8 @@ class ChatCog(commands.Cog):
# Update profile if warranted
profile_update = result.get("profile_update")
if profile_update:
# Sanitize before storing — strips any quoted toxic language
profile_update = await self.bot.llm.sanitize_notes(profile_update)
self.bot.drama_tracker.set_user_profile(user_id, profile_update)
self._dirty_users.add(user_id)