Aevann 2024-03-08 06:12:40 +02:00
parent f7c84c6713
commit 10864430b2
1 changed files with 5 additions and 4 deletions

View File

@ -332,10 +332,11 @@ def messagereply(v):
if user_id and user_id not in {v.id, MODMAIL_ID} | BOT_IDs: if user_id and user_id not in {v.id, MODMAIL_ID} | BOT_IDs:
if can_see(user, v): if can_see(user, v):
notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=user_id).one_or_none() for user_id in c.group_dm_ids[1:]:
if not notif: notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=user_id).one_or_none()
notif = Notification(comment_id=c.id, user_id=user_id) if not notif:
g.db.add(notif) notif = Notification(comment_id=c.id, user_id=user_id)
g.db.add(notif)
title = f'New message from @{c.author_name}' title = f'New message from @{c.author_name}'
url = f'{SITE_FULL}/notifications/messages' url = f'{SITE_FULL}/notifications/messages'