'We\'ve received a /make_join/ request, so we create a partial
join event for the room and return that. We do *not* persist or
process it until the other server has signed it and sent it back.'

@defer.inlineCallbacks
@log_function
def on_make_join_request(self, room_id, user_id):

    event_content = {'membership': Membership.JOIN}
    builder = self.event_builder_factory.new({'type': EventTypes.Member, 'content': event_content, 'room_id': room_id, 'sender': user_id, 'state_key': user_id})
    try:
        message_handler = self.hs.get_handlers().message_handler
        (event, context) = (yield message_handler._create_new_client_event(builder=builder))
    except AuthError as e:
        logger.warn('Failed    to    create    join    %r    because    %s', event, e)
        raise e
    (yield self.auth.check_from_context(event, context, do_sig_check=False))
    defer.returnValue(event)
