Class: Jabber::MUC::HipChat::ReceivedPresence
- Inherits:
-
ReceivedStanza
- Object
- ReceivedStanza
- Jabber::MUC::HipChat::ReceivedPresence
- Defined in:
- lib/xmpp4r/muc/hipchat/received_presence.rb
Instance Method Summary collapse
-
#initialize(stanza, chat_host) ⇒ ReceivedPresence
constructor
A new instance of ReceivedPresence.
- #lobby? ⇒ Boolean
-
#role ⇒ Object
Room presence.
- #type ⇒ Object
Methods inherited from ReceivedStanza
#sender_id, #sender_name, #user_id
Constructor Details
#initialize(stanza, chat_host) ⇒ ReceivedPresence
Returns a new instance of ReceivedPresence.
5 6 7 8 |
# File 'lib/xmpp4r/muc/hipchat/received_presence.rb', line 5 def initialize stanza, chat_host super stanza @is_lobby = chat_host == host end |
Instance Method Details
#lobby? ⇒ Boolean
10 11 12 |
# File 'lib/xmpp4r/muc/hipchat/received_presence.rb', line 10 def lobby? @is_lobby end |
#role ⇒ Object
Room presence
20 21 22 |
# File 'lib/xmpp4r/muc/hipchat/received_presence.rb', line 20 def role item.affiliation if item end |
#type ⇒ Object
14 15 16 |
# File 'lib/xmpp4r/muc/hipchat/received_presence.rb', line 14 def type super || @stanza.show || :available end |