Skip to main content

Module safety

Module safety 

Source
Expand description

Admission policy and lockdown checks (permissions §3.3, §4.6; specification §8.9–8.10).

Structs§

ActiveLockdown
The lockdown currently in force, as lockdown management sees it.

Constants§

NEWCOMER_FORBIDDEN
Bits newcomer_restrictions must never contain (§3.3): newcomers always see and read.

Functions§

admission_policy_update
admission.policy.update of newcomer_restrictions: valid, and H3 on the bits added or removed (old XOR new ⊆ cp; only the owner exempt, see h3_owner_only).
lockdown_disable
moderation.lockdown.disable: top(A) ≥ the enabling actor’s recorded top (owner exempt), so a lower moderator cannot lift a higher one’s lockdown, and H3 on the bits the lockdown restricts, against held as in lockdown_enable.
lockdown_enable
moderation.lockdown.enable (also renewal and replacement): duration within 60 s – 7 days and H3 on the new lockdown’s mask (only the owner exempt). Enabling while one is active replaces it, so the actor must also pass lockdown_disable for the active one: a lower moderator cannot swap a higher one’s lockdown.
validate_newcomer_restrictions
Validates a new newcomer_restrictions mask: no VIEW_CHANNEL or READ_MESSAGE_HISTORY, no newly set unknown bit.