0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-18 07:33:49 +01:00
This commit is contained in:
David Baker 2015-12-21 10:14:57 +00:00
parent b131fb1fe2
commit 091c545c4f
2 changed files with 9 additions and 9 deletions

View file

@ -170,7 +170,7 @@ class SyncHandler(BaseHandler):
for e in ephemeral_by_room[room_id]: for e in ephemeral_by_room[room_id]:
if e['type'] != 'm.receipt': if e['type'] != 'm.receipt':
continue continue
for receipt_event_id,val in e['content'].items(): for receipt_event_id, val in e['content'].items():
if 'm.read' in val: if 'm.read' in val:
if user_id in val['m.read']: if user_id in val['m.read']:
return receipt_event_id return receipt_event_id
@ -281,7 +281,7 @@ class SyncHandler(BaseHandler):
) )
notifs = yield self.unread_notifs_for_room_id( notifs = yield self.unread_notifs_for_room_id(
room_id, sync_config, ephemeral_by_room room_id, sync_config, ephemeral_by_room
) )
notif_count = None notif_count = None
if notifs is not None: if notifs is not None:

View file

@ -73,14 +73,13 @@ class EventActionsStore(SQLBaseStore):
" OR (e.topological_ordering == ? AND e.stream_ordering > ?)" " OR (e.topological_ordering == ? AND e.stream_ordering > ?)"
")" ")"
) )
txn.execute(sql, txn.execute(sql, (
( user_id, room_id,
user_id, room_id, topological_ordering, topological_ordering, stream_ordering
topological_ordering, topological_ordering, stream_ordering )
)
) )
return [ return [
{ "event_id": row[0], "actions": row[1] } for row in txn.fetchall() {"event_id": row[0], "actions": row[1]} for row in txn.fetchall()
] ]
ret = yield self.runInteraction( ret = yield self.runInteraction(
@ -89,5 +88,6 @@ class EventActionsStore(SQLBaseStore):
) )
defer.returnValue(ret) defer.returnValue(ret)
class EventActionsTable(object): class EventActionsTable(object):
table_name = "event_actions" table_name = "event_actions"