Correct the comment on the summarised threads top-up

The comment said looking up the thread's counts may create a new entry. It cannot: threads that are not in `summarised_threads` are skipped, and every thread in that set was given an entry by the loop over the summary rows.
This commit is contained in:
Paul Chobert committed 2026-09-30 10:42:07 +02:00
1 parent 404b4bfab6
commit f4da96123a
1 file changed
+2 -5
@@ -701,11 +701,8 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas
if thread_id not in summarised_threads:
continue
# Note that previous thread summaries of 0 are discarded above, so this
# may create a new entry.
#
# TODO If empty summaries are deleted this can use `thread_counts`
# directly.
# Every thread in `summarised_threads` was given an entry by the loop
# over the summary rows above, so this only tops up an existing count.
counts = _get_thread(thread_id)
counts.notify_count += notif_count
counts.unread_count += unread_count