Class: JabberAdmin::Commands::SetPresence
- Inherits:
-
Object
- Object
- JabberAdmin::Commands::SetPresence
- Defined in:
- lib/jabber_admin/commands/set_presence.rb
Overview
Send a stanza; provide From JID and valid To JID.
Class Method Summary collapse
-
.call(callable, user:, type: 'available', show: 'chat', status: '', priority: '7') ⇒ Object
rubocop:disable Metrics/ParameterLists – because of the mapping rubocop:disable Metrics/MethodLength – because of the mapping.
Class Method Details
.call(callable, user:, type: 'available', show: 'chat', status: '', priority: '7') ⇒ Object
rubocop:disable Metrics/ParameterLists – because of the mapping rubocop:disable Metrics/MethodLength – because of the mapping
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/jabber_admin/commands/set_presence.rb', line 20 def self.call(callable, user:, type: 'available', show: 'chat', status: '', priority: '7') uid, host = user.split('@') host, resource = host.split('/') resource ||= 'bot' callable.call('set_presence', user: uid, host: host, resource: resource, type: type, show: show, status: status, priority: priority) end |