chore: better args naming

This commit is contained in:
Shariq Ansari 2024-09-23 21:12:03 +05:30
parent f3b57c6240
commit 5b28657a90
3 changed files with 12 additions and 12 deletions

View File

@ -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,
})

View File

@ -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,
})

View File

@ -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):