mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:26:06 -04:00
Pass room_id to get_auth_chain_difference (#8879)
This is so that we can choose which algorithm to use based on the room ID.
This commit is contained in:
parent
b774c555d8
commit
df4b1e9c74
6 changed files with 33 additions and 17 deletions
|
@ -97,7 +97,9 @@ async def resolve_events_with_store(
|
|||
|
||||
# Also fetch all auth events that appear in only some of the state sets'
|
||||
# auth chains.
|
||||
auth_diff = await _get_auth_chain_difference(state_sets, event_map, state_res_store)
|
||||
auth_diff = await _get_auth_chain_difference(
|
||||
room_id, state_sets, event_map, state_res_store
|
||||
)
|
||||
|
||||
full_conflicted_set = set(
|
||||
itertools.chain(
|
||||
|
@ -236,6 +238,7 @@ async def _get_power_level_for_sender(
|
|||
|
||||
|
||||
async def _get_auth_chain_difference(
|
||||
room_id: str,
|
||||
state_sets: Sequence[StateMap[str]],
|
||||
event_map: Dict[str, EventBase],
|
||||
state_res_store: "synapse.state.StateResolutionStore",
|
||||
|
@ -332,7 +335,9 @@ async def _get_auth_chain_difference(
|
|||
difference_from_event_map = ()
|
||||
state_sets_ids = [set(state_set.values()) for state_set in state_sets]
|
||||
|
||||
difference = await state_res_store.get_auth_chain_difference(state_sets_ids)
|
||||
difference = await state_res_store.get_auth_chain_difference(
|
||||
room_id, state_sets_ids
|
||||
)
|
||||
difference.update(difference_from_event_map)
|
||||
|
||||
return difference
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue