This commit is contained in:
Aevann1 2021-09-27 23:50:35 +02:00
parent ab18b16930
commit 20d13c4e54
4 changed files with 8 additions and 4 deletions

View file

@ -354,7 +354,7 @@ def edit_post(pid, v):
message = f"@{v.username} has mentioned you: https://{site}{p.permalink}"
for x in notify_users:
existing = g.db.query(Comment).options(lazyload('*')).filter(Comment.author_id == NOTIFICATIONS_ACCOUNT, Comment.sentto == x.id, Comment.body == message).first()
existing = g.db.query(Comment).options(lazyload('*')).filter(Comment.author_id == NOTIFICATIONS_ACCOUNT, Comment.sentto == x.id, Comment.body == message, Comment.notifiedto == x.id).first()
if not existing: send_notification(NOTIFICATIONS_ACCOUNT, x, message)