Skip to content

Commit

Permalink
fix: set default content type to text
Browse files Browse the repository at this point in the history
  • Loading branch information
shridarpatil committed Jun 9, 2024
1 parent 3926ea5 commit 4668d6c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def send_template_message(self, doc: Document):
"""Specific to Document Event triggered Server Scripts."""
if self.disabled:
return
self.content_type = 'text'

doc_data = doc.as_dict()
if self.condition:
# check if condition satisfies
Expand Down Expand Up @@ -186,6 +186,9 @@ def notify(self, data):
headers=headers, data=json.dumps(data)
)

if not self.get("content_type"):
self.content_type = 'text'

frappe.get_doc({
"doctype": "WhatsApp Message",
"type": "Outgoing",
Expand Down

0 comments on commit 4668d6c

Please sign in to comment.