Another bugfix
This commit is contained in:
parent
8a76bddbf1
commit
8e18026e57
|
@ -45,11 +45,11 @@ class NtfyRouter:
|
|||
|
||||
def route_message(self, topic: str, title: str, message: str):
|
||||
if topic in self._formatters['notification']:
|
||||
notification_args = {notification_arg: self._formatters['notification'][topic][call_arg](topic=topic, title=title, message=message) for notification_arg in self._formatters['notification'][topic]}
|
||||
self._send_notification(user='ashish', priority='high', **notification_args)
|
||||
notification_args = {notification_arg: self._formatters['notification'][topic][notification_arg](topic=topic, title=title, message=message) for notification_arg in self._formatters['notification'][topic]}
|
||||
self._rabbitmq_publisher.send_notification(user='ashish', priority='high', **notification_args)
|
||||
elif topic in self._call_topics:
|
||||
call_args = {call_arg: self._formatters['call'][topic][call_arg](topic=topic, title=title, message=message) for call_arg in self._formatters['call'][topic]}
|
||||
self._send_call(user='ashish', **call_args)
|
||||
self._rabbitmq_publisher.send_call(user='ashish', **call_args)
|
||||
|
||||
async def start(self, rabbitmq_host: str, rabbitmq_port: int):
|
||||
self._ntfy_subscriber = NtfySubscriber([topic for message_type in self._formatters for topic in self._formatters[message_type]])
|
||||
|
|
Loading…
Reference in New Issue