diff --git a/crm/api/comment.py b/crm/api/comment.py index 8f2df3f2..db90cb54 100644 --- a/crm/api/comment.py +++ b/crm/api/comment.py @@ -1,4 +1,5 @@ import frappe +from frappe import _ from bs4 import BeautifulSoup def on_update(self, method): @@ -15,13 +16,30 @@ def notify_mentions(doc): return mentions = extract_mentions(content) for mention in mentions: + owner = frappe.get_cached_value("User", doc.owner, "full_name") + doctype = doc.reference_doctype + if doctype.startswith("CRM "): + doctype = doctype[4:].lower() + notification_text = f""" +