From b7076dffe27443b638cbd9d82a600629b8a1a07f Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Mon, 2 Mar 2026 22:00:04 -0500 Subject: [PATCH] fix: sanitize profile updates before storing in chat memory pipeline Co-Authored-By: Claude Opus 4.6 --- cogs/chat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cogs/chat.py b/cogs/chat.py index 12eb57f..85e6e3c 100644 --- a/cogs/chat.py +++ b/cogs/chat.py @@ -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)