summaryrefslogtreecommitdiff
path: root/docs/api/plugins/xep_0012.rst
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-02-27 13:16:18 +0100
committermathieui <mathieui@mathieui.net>2021-02-27 13:16:18 +0100
commit059cb290d8ae567ef189d83c45a1e38b1f3ab9dc (patch)
treeb8a85ab9a91bf7663701a077607a67a07fcc485a /docs/api/plugins/xep_0012.rst
parent5f9ab45a5e161c3035a844184736b3180dae6047 (diff)
parent3cdec464a550b775d8c251f37b863a6e2212c5d5 (diff)
downloadslixmpp-059cb290d8ae567ef189d83c45a1e38b1f3ab9dc.tar.gz
slixmpp-059cb290d8ae567ef189d83c45a1e38b1f3ab9dc.tar.bz2
slixmpp-059cb290d8ae567ef189d83c45a1e38b1f3ab9dc.tar.xz
slixmpp-059cb290d8ae567ef189d83c45a1e38b1f3ab9dc.zip
Merge branch 'async-interal-api-break-everything' into 'master'
Make the internal "api" async See merge request poezio/slixmpp!128
Diffstat (limited to 'docs/api/plugins/xep_0012.rst')
-rw-r--r--docs/api/plugins/xep_0012.rst38
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/api/plugins/xep_0012.rst b/docs/api/plugins/xep_0012.rst
index 9a12eac3..527e28d2 100644
--- a/docs/api/plugins/xep_0012.rst
+++ b/docs/api/plugins/xep_0012.rst
@@ -9,6 +9,44 @@ XEP-0012: Last Activity
:exclude-members: session_bind, plugin_init, plugin_end
+.. _api-0012:
+
+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.
+
+
Stanza elements
---------------