@@ -273,10 +273,9 @@ def _on_new_room_event(self, event, room_stream_id, extra_users=[]):
273
273
"room_key" , room_stream_id , users = extra_users , rooms = [event .room_id ]
274
274
)
275
275
276
- @defer .inlineCallbacks
277
- def _notify_app_services (self , room_stream_id ):
276
+ async def _notify_app_services (self , room_stream_id ):
278
277
try :
279
- yield self .appservice_handler .notify_interested_services (room_stream_id )
278
+ await self .appservice_handler .notify_interested_services (room_stream_id )
280
279
except Exception :
281
280
logger .exception ("Error notifying application services of event" )
282
281
@@ -475,20 +474,18 @@ async def check_for_updates(before_token, after_token):
475
474
476
475
return result
477
476
478
- @defer .inlineCallbacks
479
- def _get_room_ids (self , user , explicit_room_id ):
480
- joined_room_ids = yield self .store .get_rooms_for_user (user .to_string ())
477
+ async def _get_room_ids (self , user , explicit_room_id ):
478
+ joined_room_ids = await self .store .get_rooms_for_user (user .to_string ())
481
479
if explicit_room_id :
482
480
if explicit_room_id in joined_room_ids :
483
481
return [explicit_room_id ], True
484
- if ( yield self ._is_world_readable (explicit_room_id ) ):
482
+ if await self ._is_world_readable (explicit_room_id ):
485
483
return [explicit_room_id ], False
486
484
raise AuthError (403 , "Non-joined access not allowed" )
487
485
return joined_room_ids , True
488
486
489
- @defer .inlineCallbacks
490
- def _is_world_readable (self , room_id ):
491
- state = yield self .state_handler .get_current_state (
487
+ async def _is_world_readable (self , room_id ):
488
+ state = await self .state_handler .get_current_state (
492
489
room_id , EventTypes .RoomHistoryVisibility , ""
493
490
)
494
491
if state and "history_visibility" in state .content :
0 commit comments