0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-17 07:53:53 +01:00
This commit is contained in:
Erik Johnston 2017-04-07 13:47:04 +01:00
parent d72667fcce
commit 2a3e822f44

View file

@ -71,6 +71,15 @@ class StateStore(SQLBaseStore):
@cached(max_entries=100000, iterable=True) @cached(max_entries=100000, iterable=True)
def get_current_state_ids(self, room_id): def get_current_state_ids(self, room_id):
"""Get the current state event ids for a room based on the
current_state_events table.
Args:
room_id (str)
Returns:
deferred: dict of (type, state_key) -> event_id
"""
def _get_current_state_ids_txn(txn): def _get_current_state_ids_txn(txn):
txn.execute( txn.execute(
"""SELECT type, state_key, event_id FROM current_state_events """SELECT type, state_key, event_id FROM current_state_events