Skip to content

Commit

Permalink
Do not notify report updates when personal notes are loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
evilaliv3 committed Jun 1, 2024
1 parent 8c2261a commit 709b330
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions backend/globaleaks/jobs/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ def generate(self, session):
for user, rtip, itip, obj in itertools.chain(results1, results2, results3):
tid = user.tid

if (rtips_ids.get(rtip.id, False) or tid in silent_tids) or \
(isinstance(obj, models.Comment) and obj.author_id == user.id) or \
(rtip.last_notification > rtip.last_access):
if (tid in silent_tids) or \
rtips_ids.get(rtip.id, False) or \
rtip.last_notification > rtip.last_access or \
(isinstance(obj, models.Comment) and \
(obj.author_id == user.id or
obj.visibility == models.EnumVisibility.personal.name)):
obj.new = False
continue

Expand Down

0 comments on commit 709b330

Please sign in to comment.