slidge.group.bookmarks

Module Contents

Classes

LegacyBookmarks

This is instantiated once per BaseSession

class slidge.group.bookmarks.LegacyBookmarks(session)

This is instantiated once per BaseSession

Parameters:

session (slidge.core.session.BaseSession) –

async legacy_id_to_jid_username(legacy_id)

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 XMPPError early

Parameters:

legacy_id (slidge.util.types.LegacyGroupIdType) –

Returns:

async jid_username_to_legacy_id(username)
Parameters:

username (str) –

Returns:

abstract async fill()

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 BaseSession.login()