Class: JabberAdmin::Commands::SubscribeRoom

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

Overview

Subscribe to a MUC conference, via the mucsub feature.

Class Method Summary collapse

Class Method Details

.call(callable, user:, nick:, room:, nodes: []) ⇒ Object

Pass the correct data to the given callable.

Parameters:

  • callable (Proc, #call)

    the callable to call

  • user (String)

    user JID w/ resource (eg. tom@localhost/dummy)

  • nick (String)

    the user nickname (eg. TomTom)

  • room (String)

    room JID (eg. [email protected])

  • nodes (Array<String>) (defaults to: [])

    nodes comma separated (eg. urn:xmpp:mucsub:nodes:messages, urn:xmpp:mucsub:nodes:affiliations)



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

def self.call(callable, user:, nick:, room:, nodes: [])
  callable.call('subscribe_room',
                check_res_body: false,
                user: user,
                nick: nick,
                room: room,
                nodes: nodes.join(','))
end