Method: Jabber::MUC::SimpleMUCClient#invite
- Defined in:
- lib/xmpp4r/muc/helper/simplemucclient.rb
#invite(recipients) ⇒ Object
Request the MUC to invite users to this room
Sample usage:
my_muc.invite( {'[email protected]/laptop' => 'This coven needs both wiccarocks and hag66.',
'[email protected]' => 'This coven needs both hag66 and wiccarocks.'} )
- recipients
- Hash
-
of [JID] => [String] Reason
157 158 159 160 161 162 163 164 |
# File 'lib/xmpp4r/muc/helper/simplemucclient.rb', line 157 def invite(recipients) msg = Message.new x = msg.add(XMUCUser.new) recipients.each { |jid,reason| x.add(XMUCUserInvite.new(jid, reason)) } send(msg) end |