s/click_url/url/g in ntfy message definitions

This commit is contained in:
Fabio Manganiello 2022-06-02 00:36:14 +02:00
parent b857ce60a7
commit f080478385
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774
2 changed files with 8 additions and 8 deletions

View file

@ -21,7 +21,7 @@ class NotificationEvent(Event):
attachment: Optional[Mapping] = None, attachment: Optional[Mapping] = None,
actions: Optional[Collection[Mapping]] = None, actions: Optional[Collection[Mapping]] = None,
tags: Optional[Collection[str]] = None, tags: Optional[Collection[str]] = None,
click_url: Optional[str] = None, url: Optional[str] = None,
**kwargs **kwargs
): ):
""" """
@ -32,7 +32,7 @@ class NotificationEvent(Event):
:param priority: Message priority. :param priority: Message priority.
:param time: Message UNIX timestamp. :param time: Message UNIX timestamp.
:param tags: Notification tags. :param tags: Notification tags.
:param click_url: URL spawned when the notification is clicked. :param url: URL spawned when the notification is clicked.
:param actions: List of actions associated to the notification. :param actions: List of actions associated to the notification.
Example: Example:
@ -89,6 +89,6 @@ class NotificationEvent(Event):
tags=tags, tags=tags,
attachment=attachment, attachment=attachment,
actions=actions, actions=actions,
click_url=click_url, url=url,
**kwargs **kwargs
) )

View file

@ -95,7 +95,7 @@ class NtfyPlugin(RunnablePlugin):
message=msg.get('message'), message=msg.get('message'),
title=msg.get('title'), title=msg.get('title'),
tags=msg.get('tags'), tags=msg.get('tags'),
click_url=msg.get('click'), url=msg.get('click'),
actions=msg.get('actions'), actions=msg.get('actions'),
attachment=msg.get('attachment'), attachment=msg.get('attachment'),
) )
@ -142,7 +142,7 @@ class NtfyPlugin(RunnablePlugin):
username: Optional[str] = None, username: Optional[str] = None,
password: Optional[str] = None, password: Optional[str] = None,
title: Optional[str] = None, title: Optional[str] = None,
click_url: Optional[str] = None, url: Optional[str] = None,
attachment: Optional[str] = None, attachment: Optional[str] = None,
filename: Optional[str] = None, filename: Optional[str] = None,
actions: Optional[Collection[Mapping[str, str]]] = None, actions: Optional[Collection[Mapping[str, str]]] = None,
@ -160,7 +160,7 @@ class NtfyPlugin(RunnablePlugin):
:param username: Set if publishing to the topic requires authentication :param username: Set if publishing to the topic requires authentication
:param password: Set if publishing to the topic requires authentication :param password: Set if publishing to the topic requires authentication
:param title: Custom notification title. :param title: Custom notification title.
:param click_url: URL that should be opened when the user clicks the :param url: URL that should be opened when the user clicks the
notification. It can be an ``http(s)://`` URL, a ``mailto:`, a notification. It can be an ``http(s)://`` URL, a ``mailto:`, a
``geo:``, a link to another ntfy topic (e.g. ``ntfy://mytopic``) or ``geo:``, a link to another ntfy topic (e.g. ``ntfy://mytopic``) or
a Twitter link (e.g. ``twitter://user?screen_name=myname``). a Twitter link (e.g. ``twitter://user?screen_name=myname``).
@ -240,7 +240,7 @@ class NtfyPlugin(RunnablePlugin):
args['headers'] = { args['headers'] = {
'Filename': filename, 'Filename': filename,
**({'X-Title': title} if title else {}), **({'X-Title': title} if title else {}),
**({'X-Click': click_url} if click_url else {}), **({'X-Click': url} if url else {}),
**({'X-Email': email} if email else {}), **({'X-Email': email} if email else {}),
**({'X-Priority': priority} if priority else {}), **({'X-Priority': priority} if priority else {}),
**({'X-Tags': ','.join(tags)} if tags else {}), **({'X-Tags': ','.join(tags)} if tags else {}),
@ -255,7 +255,7 @@ class NtfyPlugin(RunnablePlugin):
'topic': topic, 'topic': topic,
'message': message, 'message': message,
**({'title': title} if title else {}), **({'title': title} if title else {}),
**({'click': click_url} if click_url else {}), **({'click': url} if url else {}),
**({'email': email} if email else {}), **({'email': email} if email else {}),
**({'priority': priority} if priority else {}), **({'priority': priority} if priority else {}),
**({'tags': tags} if tags else {}), **({'tags': tags} if tags else {}),