Class: JabberAdmin::Commands::MucRegisterNick

Inherits:
Object
  • Object
show all
Defined in:
lib/jabber_admin/commands/muc_register_nick.rb

Overview

Register a nick to a user JID in the MUC service of a server.

Note: On ejabberd <= 18.01 this command always returns a error code, even when the command was successful under the hood. (See: bit.ly/2L1CpvE)

Class Method Summary collapse

Class Method Details

.call(callable, user:, nick:) ⇒ Object

Pass the correct data to the given callable.

Parameters:

  • callable (Proc, #call)

    the callable to call

  • user (String)

    user JID wo/ resource (eg. tom@localhost)

  • nick (String)

    the user nickname (eg. TomTom)



18
19
20
21
22
23
# File 'lib/jabber_admin/commands/muc_register_nick.rb', line 18

def self.call(callable, user:, nick:)
  callable.call('muc_register_nick',
                nick: nick,
                jid: user,
                serverhost: user.split('@').last)
end