slidgnal.util#

Classes#

AttachmentSenderMixin

Attachment

A file attachment to a message

Functions#

get_filename(attachment)

get_timestamp([t])

get_emoji(r)

Module Contents#

class slidgnal.util.AttachmentSenderMixin(*a, **kw)[source]#

Bases: slidge.core.mixins.message.ContentMessageMixin

muc: slidgnal.group.MUC[source]#
session: slidgnal.session.Session[source]#
async __get_reference(quote)[source]#
Parameters:

quote (Optional[aiosignald.generated.JsonQuotev1]) –

async send_signal_msg(data, carbon=False)[source]#
Parameters:

data (aiosignald.generated.JsonDataMessagev1) –

class slidgnal.util.Attachment[source]#

Bases: slidge.util.types.LegacyAttachment

A file attachment to a message

At the minimum, one of the path, steam, data or url attribute has to be set

To be used with LegacyContact.send_files() or LegacyParticipant.send_files()

static from_json(json)[source]#
Parameters:

json (Union[aiosignald.generated.JsonAttachmentv1, aiosignald.generated.JsonAttachmentv0]) –

slidgnal.util.get_filename(attachment)[source]#
Parameters:

attachment (Union[aiosignald.generated.JsonAttachmentv1, aiosignald.generated.JsonAttachmentv0]) –

slidgnal.util.get_timestamp(t=None)[source]#
Parameters:

t (Optional[int]) –

slidgnal.util.get_emoji(r)[source]#
Parameters:

r (aiosignald.generated.JsonReactionv1) –