Skip to main content

Module policy_server

Module policy_server 

Source

StructsΒ§

UnstablePolicyContent πŸ”’
Lenient deserialiser that accepts either the stable public_keys: { ed25519: ... } shape or the MSC4284 unstable singular public_key: <ed25519> shape, and folds the latter into the former.

EnumsΒ§

FetchOutcome πŸ”’
Outcome of a /sign round-trip to the policy server.
PolicyCheck
Outcome of an inbound policy-server signature check.
PolicySigState πŸ”’
Persisted per-event policy-server outcome in eventid_policysigstate. Absence of a row means β€œno prior decision recorded; proceed with /sign”.

ConstantsΒ§

UNSTABLE_POLICY_TYPE πŸ”’
MSC4284 unstable state event type. The merged spec stabilised this to m.room.policy, but the reference policy server (and Element’s default deployments as of 2026-05) still write the unstable type with the singular public_key field; reading both keeps the gate live for those rooms.

FunctionsΒ§

extract_policy_signature πŸ”’
insert_policy_signature πŸ”’
is_policy_state_event πŸ”’
parse_rate_limit πŸ”’