Class: JabberAdmin::Commands::CreateRoom

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

Overview

Create a new room (MUC).

Class Method Summary collapse

Class Method Details

.call(callable, room:, host:) ⇒ Object

Pass the correct data to the given callable.

Note: this command should not be used in the bang-variant, due to raw result string in the response. (the response body is not zero/one like on almost all commands)

Parameters:

  • callable (Proc, #call)

    the callable to call

  • room (String)

    room JID (eg. [email protected])

  • host (String)

    the jabber host (eg. localhost)



18
19
20
21
# File 'lib/jabber_admin/commands/create_room.rb', line 18

def self.call(callable, room:, host:)
  name, service = room.split('@')
  callable.call('create_room', name: name, service: service, host: host)
end