From 5b28657a906b5d7f0cfdfa7bac78764889552bff Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 23 Sep 2024 21:12:03 +0530 Subject: [PATCH] chore: better args naming --- crm/api/comment.py | 8 ++++---- crm/api/whatsapp.py | 8 ++++---- crm/fcrm/doctype/crm_notification/crm_notification.py | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/crm/api/comment.py b/crm/api/comment.py index 8649d85b2..7aa2fee52 100644 --- a/crm/api/comment.py +++ b/crm/api/comment.py @@ -36,10 +36,10 @@ def notify_mentions(doc): "notification_type": "Mention", "message": doc.content, "notification_text": notification_text, - "doctype": "Comment", - "name": doc.name, - "reference_doctype": doc.reference_doctype, - "reference_docname": doc.reference_name, + "reference_doctype": "Comment", + "reference_docname": doc.name, + "redirect_to_doctype": doc.reference_doctype, + "redirect_to_docname": doc.reference_name, }) diff --git a/crm/api/whatsapp.py b/crm/api/whatsapp.py index c2a01aef6..1a0f52fd2 100644 --- a/crm/api/whatsapp.py +++ b/crm/api/whatsapp.py @@ -44,10 +44,10 @@ def notify_agent(doc): "notification_type": "WhatsApp", "message": doc.message, "notification_text": notification_text, - "doctype": "WhatsApp Message", - "name": doc.name, - "reference_doctype": doc.reference_doctype, - "reference_docname": doc.reference_name, + "reference_doctype": "WhatsApp Message", + "reference_docname": doc.name, + "redirect_to_doctype": doc.reference_doctype, + "redirect_to_docname": doc.reference_name, }) diff --git a/crm/fcrm/doctype/crm_notification/crm_notification.py b/crm/fcrm/doctype/crm_notification/crm_notification.py index 0cf00551c..69aa127d3 100644 --- a/crm/fcrm/doctype/crm_notification/crm_notification.py +++ b/crm/fcrm/doctype/crm_notification/crm_notification.py @@ -25,10 +25,10 @@ def notify_user(args): type=args.notification_type, message=args.message, notification_text=args.notification_text, - notification_type_doctype=args.doctype, - notification_type_doc=args.name, - reference_doctype=args.reference_doctype, - reference_name=args.reference_docname, + notification_type_doctype=args.reference_doctype, + notification_type_doc=args.reference_docname, + reference_doctype=args.redirect_to_doctype, + reference_name=args.redirect_to_docname, ) if frappe.db.exists("CRM Notification", values):