From 93dbeda4504fbd57219970e8a05b4448af703271 Mon Sep 17 00:00:00 2001 From: Nikhil Kothari Date: Tue, 2 Apr 2024 11:39:44 +0530 Subject: [PATCH] fix: Message owner name for Bot messages --- raven/raven_messaging/doctype/raven_message/raven_message.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/raven/raven_messaging/doctype/raven_message/raven_message.py b/raven/raven_messaging/doctype/raven_message/raven_message.py index 9c8bc6842..a90e33b9c 100644 --- a/raven/raven_messaging/doctype/raven_message/raven_message.py +++ b/raven/raven_messaging/doctype/raven_message/raven_message.py @@ -197,7 +197,10 @@ def get_message_owner_name(self): """ Get the full name of the message owner """ - return frappe.get_cached_value("Raven User", self.owner, "full_name") + if self.is_bot_message: + return frappe.get_cached_value("Raven User", self.bot, "full_name") + else: + return frappe.get_cached_value("Raven User", self.owner, "full_name") def send_notification_for_direct_message(self): """