teamwire_api/notifications¶
NotificationInfoBase¶
A base class for notification events
ChatMemberChangeInfo¶
It contains information about changes to the members of a chat
It is used with the following events:
Events.CHAT_JOINED: Event triggered when another user joins the chat. Theusersattribute will contain the list of users that joined the chatEvents.CHAT_LEFT: Event triggered when some user leaves the chat. Theusersattribute will contain the list of users that left the chatEvents.CHAT_DELETED: Event triggered when the bot is removed from a chat. Theusersattribute will contain the list of users (including the bot's user) that were removed from the chat
Attributes
chat: Chat object. The chat this event refers tousers: list of User objects. The users that joined or left the chateditor: User object. The user who invited or removed the other user(s) to/from the chat
ChatChangeInfo¶
It contains information about chat creation, or changes to the title or administrators of a chat
It is used with the following events:
Events.CHAT_CREATED: Event triggered when a new chat is created. Thechatattribute will contain the newly created chatEvents.CHAT_TITLE_CHANGED: Event triggered when the title of the chat has been changed. The 'title' attribute will contain the new title of the chatEvents.CHAT_ADMINS_CHANGED: Event triggered when the administrators list of the chat has been changed. Theadded_adminsand theremoved_adminsattributes will respectively contain the lists of users that bacame admins or that were removed from adminsEvents.CHAT_ALLOW_SENDING_CHANGED: Event triggered when theallow_sendingproperty of the chat has been changed. Theallow_sendingattribute will contain the new valueEvents.CHAT_ALLOW_MUTE_NOTIFICATIONS_CHANGED: Event triggered when theallow_mute_notificationsproperty of the chat has been changed. Theallow_mute_notificationsattribute will contain the new valueEvents.CHAT_IS_CLOSED_CHANGED: Event triggered when theis_closedproperty of the chat has been changed. Theis_closedattribute will contain the new value
Attributes
chat: Chat object. The chat this event refers totitle: unicode (None if not present). The new title of the chatadded_admins: list of User objects. The users that were made chat administratorsremoved_admins: list of User objects. The users that were removed from the chat administratorsallow_sending: boolean. Whether other members of the chat can send messagesallow_mute_notifications: boolean. Whether members of the chat can mute notificationsis_closed: boolean. Whether the chat has been closed or reopenededitor: User object. The user who initiated the operation
MessageDeletedInfo¶
It contains information about the deletion of a message
It is used with the following events:
Events.MESSAGE_DELETED: Event triggered when a message is deleted from a chat
Attributes
chat: Chat object. The chat this event refers tomessage_id: unicode. The id of the deleted messageeditor: User object. The chat admin who deleted the message, or None if the message was deleted by its sender
MessageReadInfo¶
It contains information about the deletion of a message
It is used with the following events:
Events.MESSAGE_READ: Event triggered when someone has read the latest messages in a chat
Attributes