This commit is contained in:
j3d1 2024-04-26 00:10:26 +02:00
parent 6bfebc1f5f
commit 6d07b3eefc
2 changed files with 2 additions and 2 deletions

View file

@ -15,7 +15,7 @@ class NotificationDispatcher:
# Infinite loop to continuously listen for messages # Infinite loop to continuously listen for messages
while True: while True:
# Blocking receive to get the message from the channel layer # 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: if message:
# Process the received message # Process the received message

View file

@ -289,7 +289,7 @@ class LMTPHandler:
log.info(f"Sent message to frontend") log.info(f"Sent message to frontend")
if notifcation: if notifcation:
await channel_layer.group_send( 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}) "message": notifcation})
if new and reply: if new and reply:
log.info('Sending message to %s' % reply['To']) log.info('Sending message to %s' % reply['To'])