def process_invite(room, sender, event)
      # Return early if we're already part of this room
      membership = (@memberships[room] ||= {})
      return if membership[:type] == :join
      process_member_event room, event
      broadcast(:invited, self, room, sender)
    end
def process_invite(room, sender, event)
      # Return early if we're already part of this room
      membership = (@memberships[room] ||= {})
      return if membership[:type] == :join
      process_member_event room, event
      broadcast(:invited, self, room, sender)
    end
Process an invite to a room.
 @param room [Room] The room the user was invited to.
 @param sender [User] The user who sent the invite.
 @param event [Hash] Event data.