class Jabber::MUC::HipChat::ReceivedStanza
Public Class Methods
new(stanza)
click to toggle source
# File lib/xmpp4r/muc/hipchat/received_stanza.rb, line 5 def initialize stanza @stanza = stanza end
Public Instance Methods
sender_id()
click to toggle source
# File lib/xmpp4r/muc/hipchat/received_stanza.rb, line 20 def sender_id @stanza.from.node end
Also aliased as: room_id
sender_name()
click to toggle source
Used in room message or presence
# File lib/xmpp4r/muc/hipchat/received_stanza.rb, line 26 def sender_name @stanza.from.resource end
type()
click to toggle source
user_id()
click to toggle source
User ID is available in presences and private messages
# File lib/xmpp4r/muc/hipchat/received_stanza.rb, line 16 def user_id item.jid.node if item end
Private Instance Methods
item()
click to toggle source
# File lib/xmpp4r/muc/hipchat/received_stanza.rb, line 32 def item @item ||= begin if @stanza.x.respond_to?(:items) @stanza.x.items.first end end end