class twisted.words.iwords.IChatClient(Interface): (source)
Known implementations: twisted.words.service.ChatAvatar, twisted.words.service.IRCUser, twisted.words.service.PBMindReference
Interface through which IChatService interacts with clients.
Attribute | name | A short string, unique among users. This will be set by the IChatService at login time. |
Method | receive | Callback notifying this user of the given message sent by the given user. |
Method | groupMetaUpdate | Callback notifying this user that the metadata for the given group has changed. |
Method | userJoined | Callback notifying this user that the given user has joined the given group. |
Method | userLeft | Callback notifying this user that the given user has left the given group for the given reason. |
A short string, unique among users. This will be set by the IChatService
at login time.
Callback notifying this user of the given message sent by the given user.
This will be invoked whenever another user sends a message to a group this user is participating in, or whenever another user sends a message directly to this user. In the former case, recipient
will be the group to which the message was sent; in the latter, it will be the same object as the user who is receiving the message.
Parameters | sender | Undocumented (type: IUser ) |
recipient | Undocumented (type: IUser or IGroup ) | |
message | Undocumented (type: dict ) | |
Returns | A Deferred which fires when the message has been delivered, or which fails in some way. If the Deferred fails and the message was directed at a group, this user will be removed from that group. (type: twisted.internet.defer.Deferred ) |
Callback notifying this user that the metadata for the given group has changed.
Parameters | group | Undocumented (type: IGroup ) |
meta | Undocumented (type: dict ) | |
Returns | Undocumented (type: twisted.internet.defer.Deferred ) |
Callback notifying this user that the given user has joined the given group.
Parameters | group | Undocumented (type: IGroup ) |
user | Undocumented (type: IUser ) | |
Returns | Undocumented (type: twisted.internet.defer.Deferred ) |
Callback notifying this user that the given user has left the given group for the given reason.
Parameters | group | Undocumented (type: IGroup ) |
user | Undocumented (type: IUser ) | |
reason | Undocumented (type: unicode ) | |
Returns | Undocumented (type: twisted.internet.defer.Deferred ) |