push notifs for chats
parent
58fc68c0a4
commit
6e87a205d1
|
@ -161,6 +161,11 @@ def speak(data, v):
|
||||||
membership.notification = True
|
membership.notification = True
|
||||||
g.db.add(membership)
|
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 = {
|
data = {
|
||||||
"id": chat_message.id,
|
"id": chat_message.id,
|
||||||
"quotes": chat_message.quotes,
|
"quotes": chat_message.quotes,
|
||||||
|
|
Loading…
Reference in New Issue