Merge pull request #596 from pu-raihan/develop

This commit is contained in:
Shariq Ansari 2025-02-20 15:54:15 +05:30 committed by GitHub
commit 2a8cc03850
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,8 @@ from frappe.model.document import Document
class CRMNotification(Document):
def on_update(self):
frappe.publish_realtime("crm_notification")
if self.to_user:
frappe.publish_realtime("crm_notification", user= self.to_user)
def notify_user(args):
"""
@ -33,4 +34,4 @@ def notify_user(args):
if frappe.db.exists("CRM Notification", values):
return
frappe.get_doc(values).insert(ignore_permissions=True)
frappe.get_doc(values).insert(ignore_permissions=True)