feat: sync account freeze lifecycle
This commit is contained in:
parent
76bfc5100f
commit
47fcf0ea41
40 changed files with 1363 additions and 196 deletions
|
|
@ -26,9 +26,15 @@ type AdminCommand struct {
|
|||
CompletedAt *time.Time
|
||||
}
|
||||
|
||||
type AccountSendRestriction struct {
|
||||
// AccountFreeze is the durable account-level read-only state advertised to
|
||||
// Telegram clients through help.getAppConfig. Until is the appeal/deletion
|
||||
// deadline; reaching it does not silently unfreeze the account.
|
||||
type AccountFreeze struct {
|
||||
UserID int64
|
||||
Frozen bool
|
||||
Since time.Time
|
||||
Until time.Time
|
||||
AppealURL string
|
||||
Reason string
|
||||
Actor string
|
||||
CommandID string
|
||||
|
|
|
|||
|
|
@ -3,14 +3,15 @@ package domain
|
|||
import "errors"
|
||||
|
||||
var (
|
||||
ErrUsernameInvalid = errors.New("username invalid")
|
||||
ErrUsernameOccupied = errors.New("username occupied")
|
||||
ErrUsernameNotOccupied = errors.New("username not occupied")
|
||||
ErrPhoneNotOccupied = errors.New("phone not occupied")
|
||||
ErrFirstNameInvalid = errors.New("first name invalid")
|
||||
ErrAboutTooLong = errors.New("about too long")
|
||||
ErrUserNotFound = errors.New("user not found")
|
||||
ErrUserSendRestricted = errors.New("user send restricted")
|
||||
ErrUsernameInvalid = errors.New("username invalid")
|
||||
ErrUsernameOccupied = errors.New("username occupied")
|
||||
ErrUsernameNotOccupied = errors.New("username not occupied")
|
||||
ErrPhoneNotOccupied = errors.New("phone not occupied")
|
||||
ErrFirstNameInvalid = errors.New("first name invalid")
|
||||
ErrAboutTooLong = errors.New("about too long")
|
||||
ErrUserNotFound = errors.New("user not found")
|
||||
ErrUserFrozen = errors.New("user account frozen")
|
||||
ErrAuthenticatedScopeInvalid = errors.New("authenticated user scope invalid")
|
||||
// ErrPremiumRequired 表示该操作仅限有效会员(PREMIUM_ACCOUNT_REQUIRED)。
|
||||
ErrPremiumRequired = errors.New("premium account required")
|
||||
// ErrPremiumBotUnsupported 表示 bot 账号不可被授予会员(官方语义)。
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue