Adds a narrower spam sanction alongside the existing account freeze: a restricted account keeps every existing membership and conversation, but cannot join new channels/groups (public join or invite link) and cannot start a new conversation with a non-contact. Reachable both as a standalone admin action and as a decision on a reported user's moderation case, with the same idempotent-supersession and appeal wiring freeze already has.
9 lines
394 B
SQL
9 lines
394 B
SQL
ALTER TABLE public.moderation_actions
|
|
DROP CONSTRAINT moderation_actions_kind_check;
|
|
|
|
ALTER TABLE public.moderation_actions
|
|
ADD CONSTRAINT moderation_actions_kind_check CHECK (kind IN (
|
|
'mark_scam', 'mark_fake', 'clear_peer_flags', 'freeze_account',
|
|
'unfreeze_account', 'restrict_account', 'unrestrict_account',
|
|
'delete_private_message', 'delete_channel_message', 'delete_account'
|
|
));
|