This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,12 @@ async def _check_sigs_on_pdu(
180180
181181 # If this is a join event for a restricted room it may have been authorised
182182 # via a different server from the sending server. Check those signatures.
183- if room_version .msc3083_join_rules and _is_invite_via_allow_rule (pdu ):
183+ if (
184+ room_version .msc3083_join_rules
185+ and pdu .type == EventTypes .Member
186+ and pdu .membership == Membership .JOIN
187+ and "join_authorised_via_users_server" in pdu .content
188+ ):
184189 authorising_server = get_domain_from_id (
185190 pdu .content ["join_authorised_via_users_server" ]
186191 )
@@ -210,14 +215,6 @@ def _is_invite_via_3pid(event: EventBase) -> bool:
210215 )
211216
212217
213- def _is_invite_via_allow_rule (event : EventBase ) -> bool :
214- return (
215- event .type == EventTypes .Member
216- and event .membership == Membership .JOIN
217- and "join_authorised_via_users_server" in event .content
218- )
219-
220-
221218def event_from_pdu_json (
222219 pdu_json : JsonDict , room_version : RoomVersion , outlier : bool = False
223220) -> EventBase :
You can’t perform that action at this time.
0 commit comments