Skip to content

Commit

Permalink
Merge pull request #9 from sebastianswms/attachments
Browse files Browse the repository at this point in the history
Attachments
  • Loading branch information
visch authored Oct 16, 2024
2 parents 401d140 + a00c8dd commit 42205af
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 42205af

Please sign in to comment.