dont show notifications for posts the user himself makes in a hole they follow

master
Aevann1 2022-07-08 21:14:04 +02:00
parent 19ee55d27c
commit 65a98cd9fc
2 changed files with 4 additions and 2 deletions

View File

@ -490,7 +490,8 @@ class User(Base):
Submission.created_utc > self.last_viewed_post_notifs,
Submission.deleted_utc == 0,
Submission.is_banned == False,
Submission.private == False
Submission.private == False,
Submission.author_id != self.id
).count()
@property

View File

@ -94,7 +94,8 @@ def notifications_posts(v):
),
Submission.deleted_utc == 0,
Submission.is_banned == False,
Submission.private == False
Submission.private == False,
Submission.author_id != v.id,
).order_by(Submission.created_utc.desc()).offset(25 * (page - 1)).limit(26).all()]
next_exists = (len(listing) > 25)