diff --git a/raven/raven_messaging/doctype/raven_message/raven_message.py b/raven/raven_messaging/doctype/raven_message/raven_message.py index 3a8e6e28..5c1d32a3 100644 --- a/raven/raven_messaging/doctype/raven_message/raven_message.py +++ b/raven/raven_messaging/doctype/raven_message/raven_message.py @@ -174,7 +174,7 @@ def handle_ai_message(self): return # Get the bot user doc - peer_user_doc = frappe.get_cached_doc("Raven User", peer_user) + peer_user_doc = frappe.get_cached_doc("Raven User", peer_user.get("user_id")) if peer_user_doc.type != "Bot" or not peer_user_doc.bot: return