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 +15
-10
lines changed Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -1029,19 +1029,24 @@ async def get_persisted_pdu(
10291029 event_id , allow_none = True , allow_rejected = True
10301030 )
10311031
1032- if event :
1033- in_room = await self ._event_auth_handler .check_host_in_room (
1034- event .room_id , origin
1035- )
1036- if not in_room :
1037- raise AuthError (403 , "Host not in room." )
1032+ if not event :
1033+ return None
10381034
1039- events = await filter_events_for_server (self .storage , origin , [event ])
1040- event = events [0 ]
1041- return event
1042- else :
1035+ if event .internal_metadata .is_outlier ():
1036+ # we can't tell if the requesting server can see this event, since
1037+ # we don't have the state at that point. Return a 404.
10431038 return None
10441039
1040+ in_room = await self ._event_auth_handler .check_host_in_room (
1041+ event .room_id , origin
1042+ )
1043+ if not in_room :
1044+ raise AuthError (403 , "Host not in room." )
1045+
1046+ events = await filter_events_for_server (self .storage , origin , [event ])
1047+ event = events [0 ]
1048+ return event
1049+
10451050 async def on_get_missing_events (
10461051 self ,
10471052 origin : str ,
You can’t perform that action at this time.
0 commit comments