From 93d502735f2c6709066377f9c0d1cf08edfc2188 Mon Sep 17 00:00:00 2001 From: jedi Date: Fri, 26 Apr 2024 00:10:26 +0200 Subject: [PATCH] stash --- core/mail/notifications.py | 2 +- core/mail/protocol.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mail/notifications.py b/core/mail/notifications.py index 494e0f7..86dd5fe 100644 --- a/core/mail/notifications.py +++ b/core/mail/notifications.py @@ -15,7 +15,7 @@ class NotificationDispatcher: # Infinite loop to continuously listen for messages while True: # Blocking receive to get the message from the channel layer - message = await self.channel_layer.receive() + message = await self.channel_layer.receive('user_notification') if message: # Process the received message diff --git a/core/mail/protocol.py b/core/mail/protocol.py index 4f83742..25981b5 100644 --- a/core/mail/protocol.py +++ b/core/mail/protocol.py @@ -289,7 +289,7 @@ class LMTPHandler: log.info(f"Sent message to frontend") if notifcation: await channel_layer.group_send( - 'general', {"type": "generic.event", "name": "push_notification", "event_id": systemevent.id, + 'general', {"type": "generic.event", "name": "user_notification", "event_id": systemevent.id, "message": notifcation}) if new and reply: log.info('Sending message to %s' % reply['To'])