:orphan:

:py:mod:`slidge.group.bookmarks`
================================

.. py:module:: slidge.group.bookmarks


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   slidge.group.bookmarks.LegacyBookmarks




.. py:class:: LegacyBookmarks(session)




   This is instantiated once per :class:`~slidge.BaseSession`

   .. py:method:: legacy_id_to_jid_username(legacy_id)
      :async:

      The default implementation calls ``str()`` on the legacy_id and
      escape characters according to :xep:`0106`.

      You can override this class and implement a more subtle logic to raise
      an :class:`~slixmpp.exceptions.XMPPError` early

      :param legacy_id:
      :return:


   .. py:method:: jid_username_to_legacy_id(username)
      :async:

      :param username:
      :return:


   .. py:method:: fill()
      :abstractmethod:
      :async:

      Establish a user's known groups.

      This has to be overridden in plugins with group support and at the
      minimum, this should ``await self.by_legacy_id(group_id)`` for all
      the groups a user is part of.

      Slidge internals will call this on successful :meth:`BaseSession.login`




