Class: JabberAdmin::Commands::SendStanzaC2s
- Inherits:
-
Object
- Object
- JabberAdmin::Commands::SendStanzaC2s
- Defined in:
- lib/jabber_admin/commands/send_stanza_c2s.rb
Overview
Send a message (stanza) as if sent from a c2s session.
Class Method Summary collapse
-
.call(callable, user:, stanza:) ⇒ Object
Pass the correct data to the given callable.
Class Method Details
.call(callable, user:, stanza:) ⇒ Object
Pass the correct data to the given callable.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/jabber_admin/commands/send_stanza_c2s.rb', line 16 def self.call(callable, user:, stanza:) uid, host = user.split('@') host, resource = host.split('/') resource ||= 'bot' callable.call('send_stanza_c2s', user: uid, host: host, resource: resource, stanza: stanza) end |