lib/chatrix/api/room_actions.rb
# Kicks a user from a room.
#
# This does not ban the user, they can rejoin unless the room is
# invite-only, in which case they need a new invite to join back.
#
# @param room [String] The room to kick the user from.
# @param user [String] The user to kick.
# @param reason [String] The reason for the kick.
# @return [Boolean] `true` if the user was successfully kicked,
#   otherwise `false`.
#
# @example Kicking an annoying user
#   kick('#fun:matrix.org', '@anon:4chan.org', 'Bad cropping')
Kicks a user from a room.
This does not ban the user, they can rejoin unless the room is
invite-only, in which case they need a new invite to join back.
Kicks a user from a room . This does not ban the user they can rejoin unless the room is invite - only in which case they need a new invite to join back .
def kick(room, user, reason)
        make_request(
          :post,
          "/rooms/#{room}/kick",
          content: { reason: reason, user_id: user }
        ).code == 200
      end
def kick ( room , user , reason ) make_request ( :post , "/rooms/#{room}/kick" , content : { reason : reason , user_id : user } ) . code == 200 end
Kicks a user from a room.
Kicks a user from a room .
`true` if the user was successfully kicked, otherwise `false`.
` true ` if the user was successfully kicked otherwise ` false ` .
Boolean
room
The room to kick the user from.
The room to kick the user from .
user
The user to kick.
The user to kick .
reason
The reason for the kick.
The reason for the kick .
example
Kicking an annoying user kick('#fun:matrix.org', '@anon:4chan.org', 'Bad cropping')
Kicking an annoying user kick ( ' #fun : matrix . org ' ' @anon : 4chan . org ' ' Bad cropping ' )