XEP-0153: API changes

This commit is contained in:
mathieui
2021-02-14 12:00:25 +01:00
parent e24e2f58d4
commit ab87b25030
2 changed files with 62 additions and 29 deletions

View File

@@ -9,6 +9,42 @@ XEP-0153: vCard-Based Avatars
:exclude-members: session_bind, plugin_init, plugin_end
Internal API methods
--------------------
The internal API is used here to maintain an in-memory JID→avatar hash
cache.
.. glossary::
set_hash
- **jid**: :class:`~.JID` of whom to retrieve the last activity
- **node**: unused
- **ifrom**: unused
- **args**: ``str``, avatar hash
Set the avatar hash for a JID.
reset_hash
- **jid**: :class:`~.JID` of whom to retrieve the last activity
- **node**: unused
- **ifrom**: :class:`~.JID` of the entity requesting the reset.
- **args**: unused
- **returns**
information.
Reset the avatar hash for a JID. This downloads the vcard and computes
the hash.
get_hash
- **jid**: :class:`~.JID` of whom to retrieve the last activity
- **node**: unused
- **ifrom**: unused
- **args**: unused
- **returns**: ``Optional[str]``, the avatar hash
Get the avatar hash for a JID.
Stanza elements
---------------