From 6e87a205d11bc2530f09bacb8a928b4d6e19b6eb Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 8 Apr 2024 07:36:02 +0200 Subject: [PATCH] push notifs for chats --- files/routes/chat.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/routes/chat.py b/files/routes/chat.py index ddfe1a854..8502c8893 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -161,6 +161,11 @@ def speak(data, v): membership.notification = True g.db.add(membership) + uids = set(x.user_id for x in memberships) + title = f'New chat messages in "{chat.name}"' + url = f'{SITE_FULL}/chat/{chat.id}' + push_notif(uids, title, None, url) + data = { "id": chat_message.id, "quotes": chat_message.quotes,