mirror of
https://github.com/Casvt/MIND.git
synced 2026-04-03 03:00:22 -04:00
Fixes issue #29
This commit is contained in:
@@ -393,3 +393,26 @@ class Reminders:
|
||||
|
||||
# Return info
|
||||
return self.fetchone(id)
|
||||
|
||||
def test_reminder(
|
||||
title: str,
|
||||
notification_service: int,
|
||||
text: str = ''
|
||||
) -> None:
|
||||
"""Test send a reminder draft
|
||||
|
||||
Args:
|
||||
title (str): Title title of the entry
|
||||
notification_service (int): The id of the notification service to use to send the reminder
|
||||
text (str, optional): The body of the reminder. Defaults to ''.
|
||||
"""
|
||||
a = Apprise()
|
||||
url = get_db(dict).execute(
|
||||
"SELECT url FROM notification_services WHERE id = ?",
|
||||
(notification_service,)
|
||||
).fetchone()
|
||||
if not url:
|
||||
raise NotificationServiceNotFound
|
||||
a.add(url[0])
|
||||
a.notify(title=title, body=text)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user