Skip to main content

Module profile

Module profile 

Source

ModulesΒ§

remote πŸ”’

StructsΒ§

Service

EnumsΒ§

Propagation
Per-update policy for fanning a global profile change out to each of the user’s joined rooms as a fresh m.room.member event. Mirrors the MSC4466 propagate_to axis.

ConstantsΒ§

MAX_KEY_LENGTH πŸ”’
MSC4133 maximum profile field-name length, in bytes.
MAX_PROFILE_SIZE πŸ”’
MSC4133 maximum total profile size (64 KiB), measured over the JSON of the full profile including displayname and avatar_url.
MAX_STATUS_EMOJI_LENGTH πŸ”’
MSC4426 maximum m.status emoji length, in bytes.
MAX_STATUS_TEXT_LENGTH πŸ”’
MSC4426 maximum m.status text length, in bytes.
MAX_TIMEZONE_COMPONENTS πŸ”’
Maximum number of /-separated components in an m.tz name.
MAX_TIMEZONE_LENGTH πŸ”’
Maximum m.tz length, in bytes.

FunctionsΒ§

apply_fields πŸ”’
Lays a profile write over a room’s member content.
assign πŸ”’
check_call πŸ”’
Validate an MSC4426 call indicator.
check_profile_key πŸ”’
Validate a profile field name against the Common Namespaced Identifier Grammar: a lowercase-leading identifier over [a-z0-9_.-], matching the reference homeserver. Length is bounded separately by MAX_KEY_LENGTH.
check_profile_value πŸ”’
Validate a profile field value against the schema of the proposal naming the field.
check_status πŸ”’
Validate an MSC4426 status against its two required fields and their byte budgets.
check_status_length πŸ”’
Bound one status field by its byte budget.
check_timezone πŸ”’
Validate an MSC4175 time zone against the shape of an IANA Time Zone Database name.
is_timezone_component πŸ”’
Test one /-separated component of an m.tz name.
is_timezone_name πŸ”’
Test a string against the tzfile naming rules, narrowed to what every name the database ships actually uses.

Type AliasesΒ§

ChangeKeyVal πŸ”’
A row of the profile change log: the field’s name rides the key so that a write covering several fields needs one count, and the value names the user for the rows keyed by room.
ChangedFields πŸ”’
The field names one write actually changes, almost always just the one the caller named.
ClearedFields πŸ”’
The field names a profile holds when it is cleared.
ProfileChange
One logged profile write: the user whose profile was written, and the name of a field the write logged.
ProfileLock πŸ”’
ProfileValue πŸ”’
One field of a profile write: the name and the value to store, or None to clear it.
ProspectiveProfile πŸ”’
The stored profile as it would read after one candidate field is written.