Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
babolivier committed Jun 12, 2020
1 parent e47e5a2 commit e186c66
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions synapse/storage/data_stores/main/event_push_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import logging
from typing import Dict, Tuple

import attr
from six import iteritems

import attr
from canonicaljson import json

from twisted.internet import defer
Expand All @@ -42,6 +42,7 @@
@attr.s
class EventPushSummary(object):
"""Summary of pending event push actions for a given user in a given room."""

user_id = attr.ib()
room_id = attr.ib()
unread_count = attr.ib()
Expand Down Expand Up @@ -885,8 +886,12 @@ def _rotate_notifs_before_txn(self, txn, rotate_to_stream_ordering):
summaries = {} # type: Dict[Tuple[str, str], EventPushSummary]
for row in txn:
summaries[(row[0], row[1])] = EventPushSummary(
user_id=row[0], room_id=row[1], unread_count=row[2],
stream_ordering=row[3], old_user_id=row[4], notif_count=0,
user_id=row[0],
room_id=row[1],
unread_count=row[2],
stream_ordering=row[3],
old_user_id=row[4],
notif_count=0,
)

# Then get the count of notifications.
Expand Down

0 comments on commit e186c66

Please sign in to comment.