Skip to content

Commit

Permalink
Attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Smiley committed Sep 23, 2024
1 parent 401d140 commit a221be5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion target_apprise/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def process_record(self, record: dict, context: dict) -> None:

title: Optional[str] = record.get("title")
body: Optional[str] = record.get("body")
attach: Optional[str] = record.get("attach")
if title is None and body is None:
raise Exception("Both the title and body cannot be None")
if a.notify(title=title, body=body) is False:
if a.notify(title=title, body=body, attach=attach) is False:
raise Exception("Failed to send notification")

0 comments on commit a221be5

Please sign in to comment.