slidge.core.mixins#

Submodules#

Package Contents#

Classes#

class slidge.core.mixins.ChatterDiscoMixin[source]#

Bases: BaseDiscoMixin

AVATAR = True#
RECEIPTS = True#
MARKS = True#
CHAT_STATES = True#
UPLOAD = True#
CORRECTION = True#
REACTION = True#
RETRACTION = True#
REPLIES = True#
DISCO_TYPE = 'pc'#
DISCO_CATEGORY = 'client'#
DISCO_NAME = ''#
features()#
async extended_features()#
class slidge.core.mixins.MessageCarbonMixin[source]#

Bases: ChatStateMixin, CarbonMessageMixin

class slidge.core.mixins.MessageMixin[source]#

Bases: ChatStateMixin, MarkerMixin, ContentMessageMixin

class slidge.core.mixins.PresenceMixin[source]#

Bases: slidge.core.mixins.base.BaseSender

_last_presence: _CachedPresence | None#
_ONLY_SEND_PRESENCE_CHANGES = False#
_make_presence(*, last_seen=None, force=False, **presence_kwargs)#
Parameters:

last_seen (Optional[datetime.datetime]) –

_send_last_presence()#
online(status=None, last_seen=None)#

Send an “online” presence from this contact to the user.

Parameters:
  • status (Optional[str]) – Arbitrary text, details of the status, eg: “Listening to Britney Spears”

  • last_seen (Optional[datetime.datetime]) – For XEP-0319

away(status=None, last_seen=None)#

Send an “away” presence from this contact to the user.

This is a global status, as opposed to LegacyContact.inactive() which concerns a specific conversation, ie a specific “chat window”

Parameters:
  • status (Optional[str]) – Arbitrary text, details of the status, eg: “Gone to fight capitalism”

  • last_seen (Optional[datetime.datetime]) – For XEP-0319

extended_away(status=None, last_seen=None)#

Send an “extended away” presence from this contact to the user.

This is a global status, as opposed to LegacyContact.inactive() which concerns a specific conversation, ie a specific “chat window”

Parameters:
  • status (Optional[str]) – Arbitrary text, details of the status, eg: “Gone to fight capitalism”

  • last_seen (Optional[datetime.datetime]) – For XEP-0319

busy(status=None, last_seen=None)#

Send a “busy” (ie, “dnd”) presence from this contact to the user,

Parameters:
offline(status=None, last_seen=None)#

Send an “offline” presence from this contact to the user.

Parameters:
class slidge.core.mixins.FullMixin[source]#

Bases: disco.ChatterDiscoMixin, message.MessageMixin, presence.PresenceMixin

class slidge.core.mixins.FullCarbonMixin[source]#

Bases: disco.ChatterDiscoMixin, message.MessageCarbonMixin, presence.PresenceMixin