matrix

class platypush.message.event.matrix.MatrixCallAnswerEvent(*args, call_id: str, version: int, sdp: Optional[str] = None, **kwargs)[source]

Bases: MatrixCallEvent

Event triggered by the callee when they wish to answer the call.

class platypush.message.event.matrix.MatrixCallEvent(*args, call_id: str, version: int, sdp: Optional[str] = None, **kwargs)[source]

Bases: MatrixEvent

Base class for Matrix call events.

__init__(*args, call_id: str, version: int, sdp: Optional[str] = None, **kwargs)[source]
Parameters:
  • call_id – The unique ID of the call.

  • version – An increasing integer representing the version of the call.

  • sdp – SDP text of the session description.

class platypush.message.event.matrix.MatrixCallHangupEvent(*args, call_id: str, version: int, sdp: Optional[str] = None, **kwargs)[source]

Bases: MatrixCallEvent

Event triggered when a participant in the call exists.

class platypush.message.event.matrix.MatrixCallInviteEvent(*args, invite_validity: Optional[float] = None, **kwargs)[source]

Bases: MatrixCallEvent

Event triggered when the user is invited to a call.

__init__(*args, invite_validity: Optional[float] = None, **kwargs)[source]
Parameters:
  • invite_validity – For how long the invite will be valid, in seconds.

  • sdp – SDP text of the session description.

class platypush.message.event.matrix.MatrixEncryptedMessageEvent(*args, body: str = '', url: Optional[str] = None, thumbnail_url: Optional[str] = None, mimetype: Optional[str] = None, formatted_body: Optional[str] = None, format: Optional[str] = None, **kwargs)[source]

Bases: MatrixMessageEvent

Event triggered when a message is received but the client doesn’t have the E2E keys to decrypt it, or encryption has not been enabled.

class platypush.message.event.matrix.MatrixEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: Event

Base matrix event.

__init__(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]
Parameters:
  • server_url – Base server URL.

  • sender_id – The event’s sender ID.

  • sender_display_name – The event’s sender display name.

  • sender_avatar_url – The event’s sender avatar URL.

  • room_id – Event room ID.

  • room_name – The name of the room associated to the event.

  • room_topic – The topic of the room associated to the event.

  • server_timestamp – The server timestamp of the event.

class platypush.message.event.matrix.MatrixMessageAudioEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when a message containing an audio file is received.

class platypush.message.event.matrix.MatrixMessageEvent(*args, body: str = '', url: Optional[str] = None, thumbnail_url: Optional[str] = None, mimetype: Optional[str] = None, formatted_body: Optional[str] = None, format: Optional[str] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when a message is received on a subscribed room.

__init__(*args, body: str = '', url: Optional[str] = None, thumbnail_url: Optional[str] = None, mimetype: Optional[str] = None, formatted_body: Optional[str] = None, format: Optional[str] = None, **kwargs)[source]
Parameters:
  • body – The body of the message.

  • url – The URL of the media file, if the message includes media.

  • thumbnail_url – The URL of the thumbnail, if the message includes media.

  • mimetype – The MIME type of the media file, if the message includes media.

  • formatted_body – The formatted body, if format is specified.

  • format – The format of the message (e.g. html or markdown).

class platypush.message.event.matrix.MatrixMessageFileEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when a message containing a generic file is received.

class platypush.message.event.matrix.MatrixMessageImageEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when a message containing an image is received.

class platypush.message.event.matrix.MatrixMessageVideoEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when a message containing a video file is received.

class platypush.message.event.matrix.MatrixReactionEvent(*args, in_response_to_event_id: str, **kwargs)[source]

Bases: MatrixEvent

Event triggered when a user submits a reaction to an event.

__init__(*args, in_response_to_event_id: str, **kwargs)[source]
Parameters:

in_response_to_event_id – The ID of the URL related to the reaction.

class platypush.message.event.matrix.MatrixRoomCreatedEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when a room is created.

class platypush.message.event.matrix.MatrixRoomInviteEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when the user is invited to a room.

class platypush.message.event.matrix.MatrixRoomJoinEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when a user joins a room.

class platypush.message.event.matrix.MatrixRoomLeaveEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when a user leaves a room.

class platypush.message.event.matrix.MatrixRoomSeenReceiptEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when the last message seen by a user in a room is updated.

class platypush.message.event.matrix.MatrixRoomTopicChangedEvent(*args, topic: str, **kwargs)[source]

Bases: MatrixEvent

Event triggered when the topic/title of a room changes.

__init__(*args, topic: str, **kwargs)[source]
Parameters:

topic – New room topic.

class platypush.message.event.matrix.MatrixRoomTypingStartEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when a user in a room starts typing.

class platypush.message.event.matrix.MatrixRoomTypingStopEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when a user in a room stops typing.

class platypush.message.event.matrix.MatrixSyncEvent(*args, server_url: str, sender_id: Optional[str] = None, sender_display_name: Optional[str] = None, sender_avatar_url: Optional[str] = None, room_id: Optional[str] = None, room_name: Optional[str] = None, room_topic: Optional[str] = None, server_timestamp: Optional[datetime] = None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when the startup synchronization has been completed and the plugin is ready to use.

class platypush.message.event.matrix.MatrixUserPresenceEvent(*args, is_active: bool, last_active: datetime.datetime | None, **kwargs)[source]

Bases: MatrixEvent

Event triggered when a user comes online or goes offline.

__init__(*args, is_active: bool, last_active: datetime.datetime | None, **kwargs)[source]
Parameters:
  • is_active – True if the user is currently online.

  • topic – When the user was last active.