admin: add account spam restriction (join/message gate)
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.
This commit is contained in:
parent
3ca8ef1a16
commit
f33e25af8d
32 changed files with 750 additions and 44 deletions
|
|
@ -954,6 +954,10 @@ func (s *ModerationReportStore) memoryCaseOwnsRemedySanctionsLocked(item domain.
|
|||
if latest.Kind != domain.ModerationActionFreezeAccount {
|
||||
return false
|
||||
}
|
||||
case domain.ModerationActionUnrestrictAccount:
|
||||
if latest.Kind != domain.ModerationActionRestrictAccount {
|
||||
return false
|
||||
}
|
||||
default:
|
||||
return false
|
||||
}
|
||||
|
|
@ -968,6 +972,8 @@ func memoryModerationActionsValid(target domain.Peer, actions []domain.Moderatio
|
|||
domain.ModerationActionClearPeerFlags:
|
||||
case domain.ModerationActionFreezeAccount,
|
||||
domain.ModerationActionUnfreezeAccount,
|
||||
domain.ModerationActionRestrictAccount,
|
||||
domain.ModerationActionUnrestrictAccount,
|
||||
domain.ModerationActionDeletePrivateMessage,
|
||||
domain.ModerationActionDeleteAccount:
|
||||
if target.Type != domain.PeerTypeUser {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue