'Invite someone to a room!'

@defer.inlineCallbacks
def invite_to_room(self, room_name, sender, invitee):

    self._on_invite(self.server_name, room_name, invitee)
    destinations = (yield self.get_servers_for_context(room_name))
    try:
        (yield self.replication_layer.send_pdu(Pdu.create_new(context=room_name, is_state=True, pdu_type='sy.room.member', state_key=invitee, content={'membership': 'invite'}, origin=self.server_name, destinations=destinations)))
    except Exception as e:
        logger.exception(e)
