diff options
author | 2021-07-11 16:22:21 +0200 | |
---|---|---|
committer | 2021-07-11 16:22:21 +0200 | |
commit | 846057f0d696fded87d105dec1245e9ba32763ce (patch) | |
tree | 9a4914c07bcf189a3eea0a2c091567c56cdf4963 /internal/gtsmodel/block.go | |
parent | favourites GET implementation (#95) (diff) | |
download | gotosocial-846057f0d696fded87d105dec1245e9ba32763ce.tar.xz |
Block/unblock (#96)
* remote + local block logic, incl. federation
* improve blocking stuff
* fiddle with display of blocked profiles
* go fmt
Diffstat (limited to 'internal/gtsmodel/block.go')
-rw-r--r-- | internal/gtsmodel/block.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/gtsmodel/block.go b/internal/gtsmodel/block.go index 27b39727c..32afede55 100644 --- a/internal/gtsmodel/block.go +++ b/internal/gtsmodel/block.go @@ -11,9 +11,11 @@ type Block struct { // When was this block updated UpdatedAt time.Time `pg:"type:timestamp,notnull,default:now()"` // Who created this block? - AccountID string `pg:"type:CHAR(26),notnull"` + AccountID string `pg:"type:CHAR(26),notnull"` + Account *Account `pg:"rel:has-one"` // Who is targeted by this block? - TargetAccountID string `pg:"type:CHAR(26),notnull"` + TargetAccountID string `pg:"type:CHAR(26),notnull"` + TargetAccount *Account `pg:"rel:has-one"` // Activitypub URI for this block - URI string + URI string `pg:",notnull"` } |