slidge.core.mixins.presence
#
Module Contents#
Classes#
- exception slidge.core.mixins.presence._NoChange[source]#
Bases:
Exception
Common base class for all non-exit exceptions.
Initialize self. See help(type(self)) for accurate signature.
- class slidge.core.mixins.presence._CachedPresence[source]#
-
- last_seen: datetime.datetime | None[source]#
- class slidge.core.mixins.presence.PresenceMixin[source]#
Bases:
slidge.core.mixins.base.BaseSender
- _last_presence: _CachedPresence | None[source]#
- _make_presence(*, last_seen=None, force=False, **presence_kwargs)[source]#
- Parameters:
last_seen (Optional[datetime.datetime]) –
- online(status=None, last_seen=None)[source]#
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)[source]#
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)[source]#
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)[source]#
Send a “busy” (ie, “dnd”) presence from this contact to the user,
- Parameters:
status (Optional[str]) – eg: “Trying to make sense of XEP-0100”
last_seen (Optional[datetime.datetime]) – For XEP-0319
- offline(status=None, last_seen=None)[source]#
Send an “offline” presence from this contact to the user.
- Parameters:
status (Optional[str]) – eg: “Trying to make sense of XEP-0100”
last_seen (Optional[datetime.datetime]) – For XEP-0319