Methods
SetChatState | (u: State) | → | nothing |
Signals
ChatStateChanged | (u: Contact, u: State) |
Properties
ChatStates | a{uu} (Chat_State_Map) | Read only |
Types
Channel_Chat_State | Enum | u | |
Chat_State_Map | Mapping | a{uu} |
Description
An interface for channels for receiving notifications of remote contacts' state, and for notifying remote contacts of the local state.
Clients should assume that a contact's state is Channel_Chat_State_Inactive unless they receive a notification otherwise.
The Channel_Chat_State_Gone state is treated differently to other states:
- It may not be used for multi-user chats
- It may not be explicitly sent
- It should be automatically sent when the channel is closed
- It must not be sent to the peer if a channel is closed without being used
- Receiving it must not cause a new channel to be opened
The different states are defined by XEP-0085, but may be applied to any suitable protocol.
Methods
SetChatState (u: State) → nothing
Parameters
- State — u (Channel_Chat_State)
Possible Errors
- Network Error
- Not Available
- Invalid Argument
Signals
ChatStateChanged (u: Contact, u: State)
Parameters
- Contact — u (Contact_Handle)
- State — u (Channel_Chat_State)
Properties
ChatStates — a{uu} (Chat_State_Map)
A map containing the chat states of all contacts in this channel whose chat state is not Inactive.
Contacts in this channel, but who are not listed in this map, may be assumed to be in the Inactive state.
In implementations that do not have this property, its value may be assumed to be empty until a ChatStateChanged signal indicates otherwise.
Rationale:
This property was not present in older versions of telepathy-spec, because chat states in XMPP are not state-recoverable (if you miss the change notification signal, there's no way to know the state). However, this property still allows clients to recover state changes that were seen by the CM before the client started to deal with the channel.
In CMs that follow older spec versions, assuming Inactive will mean that initial chat states will always be assumed to be Inactive, which is the best we can do. XEP 0085 specifies Inactive as the "neutral" state to be assumed unless told otherwise.
Types
Channel_Chat_State — u
- Gone (0)
- Inactive (1)
- Active (2)
- Paused (3)
- Composing (4)
Chat_State_Map — a{uu}
- Contact — u (Contact_Handle)
- State — u (Channel_Chat_State)