mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-10 14:20:02 -04:00
Pull out event ids rather than full events for state
This commit is contained in:
parent
eb6a7cf3f4
commit
17f4f14df7
4 changed files with 119 additions and 55 deletions
|
@ -15,6 +15,14 @@
|
|||
|
||||
|
||||
class EventContext(object):
|
||||
def _set_current_state(self, current_state):
|
||||
if current_state is not None:
|
||||
self.current_state_ids = {k: e.event_id for k, e in current_state.items()}
|
||||
else:
|
||||
self.current_state_ids = None
|
||||
self._current_state = current_state
|
||||
|
||||
current_state = property(lambda self: self._current_state, _set_current_state)
|
||||
|
||||
def __init__(self, current_state=None):
|
||||
self.current_state = current_state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue