slixmpp/docs/api/plugins/xep_0012.rst

57 lines
1.4 KiB
ReStructuredText
Raw Permalink Normal View History

2020-12-09 17:09:19 +00:00
2021-01-30 18:01:38 +00:00
XEP-0012: Last Activity
=======================
2020-12-09 17:09:19 +00:00
.. module:: slixmpp.plugins.xep_0012
.. autoclass:: XEP_0012
:members:
:exclude-members: session_bind, plugin_init, plugin_end
2021-02-25 23:07:47 +00:00
.. _api-0012:
2021-02-14 10:45:03 +00:00
Internal API methods
--------------------
This plugin uses an in-memory storage by default to keep track of the
received and sent last activities.
.. glossary::
get_last_activity
- **jid**: :class:`~.JID` of whom to retrieve the last activity
- **node**: unused
- **ifrom**: who the request is from (None = local)
- **args**: ``None`` or an :class:`~.Iq` that is requesting the
- **returns**
information.
Get the last activity of a JID from the storage.
set_last_activity
- **jid**: :class:`~.JID` of whom to set the last activity
- **node**: unused
- **ifrom**: unused
- **args**: A dict containing ``'seconds'`` and ``'status'``
``{'seconds': Optional[int], 'status': Optional[str]}``
Set the last activity of a JID in the storage.
del_last_activity
- **jid**: :class:`~.JID` to delete from the storage
- **node**: unused
- **ifrom**: unused
- **args**: unused
Remove the last activity of a JID from the storage.
2020-12-09 17:09:19 +00:00
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0012.stanza
:members:
:undoc-members: