Class: Jabber::MUC::HipChat::ReceivedMessage
Instance Method Summary
collapse
#initialize, #sender_id, #sender_name, #type, #user_id
Instance Method Details
#body ⇒ Object
11
12
13
|
# File 'lib/xmpp4r/muc/hipchat/received_message.rb', line 11
def body
@stanza.body.to_s
end
|
#invite? ⇒ Boolean
21
22
23
24
25
|
# File 'lib/xmpp4r/muc/hipchat/received_message.rb', line 21
def invite?
!@stanza.x.nil? &&
@stanza.x.kind_of?(XMUCUser) &&
@stanza.x.first.kind_of?(XMUCUserInvite)
end
|
#room_name ⇒ Object
27
28
29
|
# File 'lib/xmpp4r/muc/hipchat/received_message.rb', line 27
def room_name
@stanza.children.last.first_element_text('name')
end
|
#topic ⇒ Object
7
8
9
|
# File 'lib/xmpp4r/muc/hipchat/received_message.rb', line 7
def topic
@stanza.subject.to_s
end
|
#topic? ⇒ Boolean
17
18
19
|
# File 'lib/xmpp4r/muc/hipchat/received_message.rb', line 17
def topic?
@stanza.children.first.name == "subject"
end
|