mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 22:19:23 -05:00
Don't do any database hits in receipt handling if from_key == to_key
This commit is contained in:
parent
b6d4a4c6d8
commit
4cab2cfa34
@ -174,6 +174,9 @@ class ReceiptEventSource(object):
|
|||||||
from_key = int(from_key)
|
from_key = int(from_key)
|
||||||
to_key = yield self.get_current_key()
|
to_key = yield self.get_current_key()
|
||||||
|
|
||||||
|
if from_key == to_key:
|
||||||
|
defer.returnValue(([], to_key))
|
||||||
|
|
||||||
rooms = yield self.store.get_rooms_for_user(user.to_string())
|
rooms = yield self.store.get_rooms_for_user(user.to_string())
|
||||||
rooms = [room.room_id for room in rooms]
|
rooms = [room.room_id for room in rooms]
|
||||||
events = yield self.store.get_linearized_receipts_for_rooms(
|
events = yield self.store.get_linearized_receipts_for_rooms(
|
||||||
|
Loading…
Reference in New Issue
Block a user