insanely ghetto solution to long back-and-forth chains in notifs

pull/24/head
Aevann1 2022-11-26 07:52:37 +02:00 committed by geese_suck
parent a262702a7e
commit 234fef2ba1
Signed by: geese_suck
GPG Key ID: 4D09E4B0A7264746
1 changed files with 7 additions and 0 deletions

View File

@ -359,6 +359,13 @@ def comment(v):
check_slots_command(v, v, c)
if c.level > 5:
n = g.db.query(Notification).filter_by(
comment_id=c.parent_comment.parent_comment.parent_comment.parent_comment_id,
user_id=c.parent_comment.author_id,
).one_or_none()
if n: g.db.delete(n)
g.db.flush()
if v.client: return c.json(db=g.db)