diff options
author | 2021-07-05 13:23:03 +0200 | |
---|---|---|
committer | 2021-07-05 13:23:03 +0200 | |
commit | d389e7b150df6ecd215c7b661b294ea153ad0103 (patch) | |
tree | 8739e3103cb5130875d903cc7fc72fd9db3b8434 /internal/gtsmodel/domainblock.go | |
parent | Fix 404 contact (#74) (diff) | |
download | gotosocial-d389e7b150df6ecd215c7b661b294ea153ad0103.tar.xz |
Domain block (#76)
* start work on admin domain blocking
* move stuff around + further work on domain blocks
* move + restructure processor
* prep work for deleting account
* tidy
* go fmt
* formatting
* domain blocking more work
* check domain blocks way earlier on
* progress on delete account
* delete more stuff when an account is gone
* and more...
* domain blocky block block
* get individual domain block, delete a block
Diffstat (limited to 'internal/gtsmodel/domainblock.go')
-rw-r--r-- | internal/gtsmodel/domainblock.go | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/internal/gtsmodel/domainblock.go b/internal/gtsmodel/domainblock.go index f5c96d832..b32984e95 100644 --- a/internal/gtsmodel/domainblock.go +++ b/internal/gtsmodel/domainblock.go @@ -20,28 +20,24 @@ package gtsmodel import "time" -// DomainBlock represents a federation block against a particular domain, of varying severity. +// DomainBlock represents a federation block against a particular domain type DomainBlock struct { // ID of this block in the database ID string `pg:"type:CHAR(26),pk,notnull,unique"` - // Domain to block. If ANY PART of the candidate domain contains this string, it will be blocked. - // For example: 'example.org' also blocks 'gts.example.org'. '.com' blocks *any* '.com' domains. - // TODO: implement wildcards here - Domain string `pg:",notnull"` + // blocked domain + Domain string `pg:",pk,notnull,unique"` // When was this block created CreatedAt time.Time `pg:"type:timestamp,notnull,default:now()"` // When was this block updated UpdatedAt time.Time `pg:"type:timestamp,notnull,default:now()"` // Account ID of the creator of this block CreatedByAccountID string `pg:"type:CHAR(26),notnull"` - // TODO: define this - Severity int - // Reject media from this domain? - RejectMedia bool - // Reject reports from this domain? - RejectReports bool // Private comment on this block, viewable to admins PrivateComment string // Public comment on this block, viewable (optionally) by everyone PublicComment string + // whether the domain name should appear obfuscated when displaying it publicly + Obfuscate bool + // if this block was created through a subscription, what's the subscription ID? + SubscriptionID string `pg:"type:CHAR(26)"` } |