core.rostermanager

The roster manager manages users rosters and the state of their contacts. It implements the part of RFC6162 that define rosters.

Since the roster encodes information that is connected to the rosters of other users, it is part of a graph. This graph is a global self-correcting data structure.

The roster object

The roster is represented by a data structure that looks something like this:

It is a map of JIDs to a table of information about each contact, which has a nickname, subscription state and roster groups that the local user added them to.

Storage

These handle loading roster from, and storing to the configured persistent storage. The roster is transparently cached in memory as long as the corresponding user is connected.

load_roster("user", "example.com") returns the roster object for username@example.com, either by loading from storage or from prosody.bare_sessions["username@example"].roster.

All methods

TODO Write about what these do.