Class: JabberAdmin::Commands::Unregister

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

Overview

Unregister (delete) a user from the XMPP service.

Class Method Summary collapse

Class Method Details

.call(callable, user:) ⇒ 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)



13
14
15
16
17
18
19
# File 'lib/jabber_admin/commands/unregister.rb', line 13

def self.call(callable, user:)
  uid, host = user.split('@')
  callable.call('unregister',
                check_res_body: false,
                user: uid,
                host: host)
end