synapse/state.py
def resolve_state_groups_for_events(self, room_id, event_ids):
        """ Given a list of event_ids this method fetches the state at each
        event, resolves conflicts between them and returns them.

        Args:
            room_id (str):
            event_ids (list[str]):

        Returns:
            Deferred[_StateCacheEntry]: resolved state
        """
        logger.debug("resolve_state_groups event_ids %s", event_ids)

        # map from state group id to the state in that state group (where
        # 'state' is a map from state key to event id)
        # dict[int, dict[(str, str), str]]
        state_groups_ids = yield self.store.get_state_groups_ids(
            room_id, event_ids
        )

        if len(state_groups_ids) == 1:
            name, state_list = state_groups_ids.items().pop()

            prev_group, delta_ids = yield self.store.get_state_group_delta(name)

            defer.returnValue(_StateCacheEntry(
                state=state_list,
                state_group=name,
                prev_group=prev_group,
                delta_ids=delta_ids,
            ))

        result = yield self._state_resolution_handler.resolve_state_groups(
            room_id, state_groups_ids, None, self._state_map_factory,
        )
        defer.returnValue(result)
 Given a list of event_ids this method fetches the state at each
        event, resolves conflicts between them and returns them.

        Args:
            room_id (str):
            event_ids (list[str]):

        Returns:
            Deferred[_StateCacheEntry]: resolved state
        
Given a list of event_ids this method fetches the state at each
event, resolves conflicts between them and returns them.
Given a list of event_ids this method fetches the state at each event resolves conflicts between them and returns them .
def resolve_state_groups_for_events(self, room_id, event_ids):
        logger.debug("resolve_state_groups event_ids %s", event_ids)
        state_groups_ids = yield self.store.get_state_groups_ids(
            room_id, event_ids
        )
        if len(state_groups_ids) == 1:
            name, state_list = state_groups_ids.items().pop()
            prev_group, delta_ids = yield self.store.get_state_group_delta(name)
            defer.returnValue(_StateCacheEntry(
                state=state_list,
                state_group=name,
                prev_group=prev_group,
                delta_ids=delta_ids,
            ))
        result = yield self._state_resolution_handler.resolve_state_groups(
            room_id, state_groups_ids, None, self._state_map_factory,
        )
        defer.returnValue(result)
def resolve_state_groups_for_events ( self , room_id , event_ids ) : logger . debug ( "resolve_state_groups event_ids %s" , event_ids ) state_groups_ids = yield self . store . get_state_groups_ids ( room_id , event_ids ) if len ( state_groups_ids ) == 1 : name , state_list = state_groups_ids . items ( ) . pop ( ) prev_group , delta_ids = yield self . store . get_state_group_delta ( name ) defer . returnValue ( _StateCacheEntry ( state = state_list , state_group = name , prev_group = prev_group , delta_ids = delta_ids , ) ) result = yield self . _state_resolution_handler . resolve_state_groups ( room_id , state_groups_ids , None , self . _state_map_factory , ) defer . returnValue ( result )
Given a list of event_ids this method fetches the state at each
event, resolves conflicts between them and returns them.
Given a list of event_ids this method fetches the state at each event resolves conflicts between them and returns them .
""" Given a list of event_ids this method fetches the state at each
        event, resolves conflicts between them and returns them.

        Args:
            room_id (str):
            event_ids (list[str]):

        Returns:
            Deferred[_StateCacheEntry]: resolved state
        """ # map from state group id to the state in that state group (where # 'state' is a map from state key to event id) # dict[int, dict[(str, str), str]]
None
Deferred[_StateCacheEntry]
self
room_id
None
event_ids
None