#NEWLINE# @ defer . inlineCallbacks #NEWLINE# def inject_room_member( self , room , user , membership ) : #NEWLINE# #INDENT# builder = self . event_builder_factory . new ( { #NEWLINE# #INDENT# 'type' : EventTypes . Member , #NEWLINE# 'sender' : user . to_string ( ) , #NEWLINE# 'state_key' : user . to_string ( ) , #NEWLINE# 'room_id' : room . to_string ( ) , #NEWLINE# 'content' : { #NEWLINE# #INDENT# 'membership' : membership , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# ( event , context ) = ( yield self . message_handler . _create_new_client_event ( builder ) ) #NEWLINE# ( yield self . store . persist_event ( event , context ) ) #NEWLINE# defer . returnValue ( event )