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'])