Sha256: 4123d7a98cfaa26d92fe49ccf65f7f9e3cd300764ac750a1a357575f520ad698

Contents?: true

Size: 873 Bytes

Versions: 14

Compression:

Stored size: 873 Bytes

Contents

# frozen_string_literal: true

module JabberAdmin
  module Commands
    # 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:
    # https://bit.ly/2L1CpvE)
    #
    # @see https://bit.ly/2G9EBNQ
    class MucRegisterNick
      # 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 nick [String] the user nickname (eg. +TomTom+)
      def self.call(callable, user:, nick:)
        callable.call('muc_register_nick',
                      nick: nick,
                      jid: user,
                      serverhost: user.split('@').last)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
jabber_admin-1.3.4 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-1.3.3 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-1.3.2 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-1.3.1 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-1.3.0 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-1.2.0 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-1.1.0 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-1.0.5 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-1.0.4 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-1.0.3 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-1.0.2 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-1.0.1 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-1.0.0 lib/jabber_admin/commands/muc_register_nick.rb
jabber_admin-0.2.0 lib/jabber_admin/commands/muc_register_nick.rb