Sha256: dc7f593bfdfebe4476bbbf6e040f5d12ad8aa878d4ac190334dafc7bf2d43dff
Contents?: true
Size: 913 Bytes
Versions: 14
Compression:
Stored size: 913 Bytes
Contents
# frozen_string_literal: true module JabberAdmin module Commands # Change a user affiliation in a MUC room. (eg. allow him to enter a # members-only room) # # @see https://bit.ly/2G5MfbW class SetRoomAffiliation # Pass the correct data to the given callable. # # @param callable [Proc, #call] the callable to call # @param user [String] user JID wo/ resource (eg. +tom@localhost+) # @param room [String] room JID (eg. +room1@conference.localhost+) # @param affiliation [String] the MUC/user affiliation (eg. +member+) def self.call(callable, user:, room:, affiliation: 'member') name, service = room.split('@') callable.call('set_room_affiliation', name: name, service: service, jid: user, affiliation: affiliation) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems