Class: Jabber::MUC::HipChat::ReceivedPresence

Inherits:
ReceivedStanza show all
Defined in:
lib/xmpp4r/muc/hipchat/received_presence.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


10
11
12
# File 'lib/xmpp4r/muc/hipchat/received_presence.rb', line 10

def lobby?
  @is_lobby
end

#roleObject

Room presence



20
21
22
# File 'lib/xmpp4r/muc/hipchat/received_presence.rb', line 20

def role
  item.affiliation if item
end

#typeObject



14
15
16
# File 'lib/xmpp4r/muc/hipchat/received_presence.rb', line 14

def type
  super || @stanza.show || :available
end