mautrix.client.state_store.async_pg

class mautrix.client.state_store.asyncpg.PgStateStore

Bases: mautrix.client.StateStore

__init__(db)
Parameters

db (mautrix.util.async_db.Database) –

Return type

None

async get_members_filtered(room_id, not_prefix, not_suffix, not_id, memberships=(Membership.JOIN, Membership.INVITE))

A filtered version of get_members that only returns user IDs that aren’t operated by a bridge. This should return the same as get_members(), except users where the user ID is equal to not_id OR it starts with not_prefix AND ends with not_suffix.

The default implementation simply calls get_members(), but databases can implement this more efficiently.

Parameters
  • room_id (mautrix.types.RoomID) – The room ID to find.

  • not_prefix (str) – The user ID prefix to disallow.

  • not_suffix (str) – The user ID suffix to disallow.

  • not_id (str) – The user ID to disallow.

  • memberships (tuple[mautrix.types.Membership, ...]) – The membership states to include.

Return type

list[mautrix.types.UserID]