Skip to content

Commit

Permalink
dev 30/10
Browse files Browse the repository at this point in the history
  • Loading branch information
jumping2000 authored Oct 30, 2022
1 parent f6f1894 commit 90170de
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions apps/notifier/notification_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,20 @@ def send_notify(self, data, notify_name, assistant_name: str):
extra_data = {}
if isinstance(telegram, dict):
extra_data = telegram
if caption == "":
caption = ("{}\n{}".format(titolo,messaggio))
if image != "" and image.find("http") != -1:
url_data = {"url": image,
"caption": caption,
"timeout": 90
}
extra_data.update({"photo":url_data})
if image != "" and image.find("http") == -1:
file_data = {"file": image,
"caption": caption,
"timeout": 90
}
extra_data.update({"photo":file_data})
if caption == "":
caption = ("{}\n{}".format(titolo,messaggio))
if image != "" and image.find("http") != -1:
url_data = {"url": image,
"caption": caption,
"timeout": 90
}
extra_data.update({"photo":url_data})
if image != "" and image.find("http") == -1:
file_data = {"file": image,
"caption": caption,
"timeout": 90
}
extra_data.update({"photo":file_data})
if str(html).lower() not in ["true","on","yes","1"]:
messaggio = messaggio.replace("_","\_")
if link !="":
Expand Down

0 comments on commit 90170de

Please sign in to comment.