diff --git a/files/classes/user.py b/files/classes/user.py index 4d33d0b38..398aa51c0 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -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 diff --git a/files/routes/notifications.py b/files/routes/notifications.py index 4241fad1c..797bf550f 100644 --- a/files/routes/notifications.py +++ b/files/routes/notifications.py @@ -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)