Presense Type is the ‘‘type’’ attribute of a presence packet and identifies the purpose of the packet. If no type attribute is present, it signifies that the use is available. A type value of unavailable indicates that a user went offline or left a room (depending on the from). The other main type values have to do with subscription and either indicate a subscription request/answer or subscription state.
The mode of a presence is actually the ‘‘show’’ attribute of a presence packet. It is used in presence packets whose type is ‘‘available’’ and provides more detailed information about the users level of availability. Valid values are available, chat, away, xa (extended away), and dnd (do not disturb).