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
|
|
@ -128,6 +128,14 @@ func mediaEmptyErr() error { return tgerr.New(400, "MEDIA_EMPTY") }
|
|||
func frozenMethodInvalidErr() error { return tgerr.New(420, "FROZEN_METHOD_INVALID") }
|
||||
func frozenParticipantMissingErr() error { return tgerr.New(400, "FROZEN_PARTICIPANT_MISSING") }
|
||||
|
||||
// restrictedMethodInvalidErr covers a spam-restricted account attempting to
|
||||
// join a new channel/group (public join or private invite link).
|
||||
func restrictedMethodInvalidErr() error { return tgerr.New(420, "USER_RESTRICTED") }
|
||||
|
||||
// restrictedNoncontactErr covers a spam-restricted account attempting to
|
||||
// start a new conversation with a peer that is not in its contacts.
|
||||
func restrictedNoncontactErr() error { return tgerr.New(403, "USER_RESTRICTED_NONCONTACT") }
|
||||
|
||||
func photoInvalidErr() error { return tgerr.New(400, "PHOTO_INVALID") }
|
||||
|
||||
func stickersetInvalidErr() error { return tgerr.New(406, "STICKERSET_INVALID") }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue