add push notifs

pull/227/head
Aevann 2024-05-24 05:16:13 +03:00
parent 470f4e23c4
commit 216e0a9604
1 changed files with 6 additions and 0 deletions

View File

@ -177,6 +177,12 @@ def speak(data, v):
membership.mentions += 1
g.db.add(membership)
uids = set(x.user_id for x in memberships)
title = f'New mention of you in "{chat.name}"'
body = chat_message.text
url = f'{SITE_FULL}/chat/{chat.id}'
push_notif(uids, title, body, url)
data = {
"id": chat_message.id,