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: 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,
actions: Optional[Collection[Mapping]] = None,
tags: Optional[Collection[str]] = None,
click_url: Optional[str] = None,
url: Optional[str] = None,
**kwargs
):
"""
@ -32,7 +32,7 @@ class NotificationEvent(Event):
:param priority: Message priority.
:param time: Message UNIX timestamp.
: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.
Example:
@ -89,6 +89,6 @@ class NotificationEvent(Event):
tags=tags,
attachment=attachment,
actions=actions,
click_url=click_url,
url=url,
**kwargs
)

View File

@ -95,7 +95,7 @@ class NtfyPlugin(RunnablePlugin):
message=msg.get('message'),
title=msg.get('title'),
tags=msg.get('tags'),
click_url=msg.get('click'),
url=msg.get('click'),
actions=msg.get('actions'),
attachment=msg.get('attachment'),
)
@ -142,7 +142,7 @@ class NtfyPlugin(RunnablePlugin):
username: Optional[str] = None,
password: Optional[str] = None,
title: Optional[str] = None,
click_url: Optional[str] = None,
url: Optional[str] = None,
attachment: Optional[str] = None,
filename: Optional[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 password: Set if publishing to the topic requires authentication
: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
``geo:``, a link to another ntfy topic (e.g. ``ntfy://mytopic``) or
a Twitter link (e.g. ``twitter://user?screen_name=myname``).
@ -240,7 +240,7 @@ class NtfyPlugin(RunnablePlugin):
args['headers'] = {
'Filename': filename,
**({'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-Priority': priority} if priority else {}),
**({'X-Tags': ','.join(tags)} if tags else {}),
@ -255,7 +255,7 @@ class NtfyPlugin(RunnablePlugin):
'topic': topic,
'message': message,
**({'title': title} if title else {}),
**({'click': click_url} if click_url else {}),
**({'click': url} if url else {}),
**({'email': email} if email else {}),
**({'priority': priority} if priority else {}),
**({'tags': tags} if tags else {}),