diff options
author | 2021-08-29 12:03:08 +0200 | |
---|---|---|
committer | 2021-08-29 12:03:08 +0200 | |
commit | 53507ac2a32a785b5467b1e58d033780d8e02693 (patch) | |
tree | 1c48ac9f5fc47e65450d53d8d26d0dee30753687 /internal/gtsmodel/mention.go | |
parent | Replace federating DB locks map, add a cleanup goroutine (#166) (diff) | |
download | gotosocial-53507ac2a32a785b5467b1e58d033780d8e02693.tar.xz |
Mention fixup (#167)
* rework mention creation a bit
* rework mention creation a bit
* tidy up status dereferencing
* start adding tests for dereferencing
* fixups
* fix
* review changes
Diffstat (limited to 'internal/gtsmodel/mention.go')
-rw-r--r-- | internal/gtsmodel/mention.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/gtsmodel/mention.go b/internal/gtsmodel/mention.go index ce5977659..79556500f 100644 --- a/internal/gtsmodel/mention.go +++ b/internal/gtsmodel/mention.go @@ -25,19 +25,19 @@ type Mention struct { // ID of this mention in the database ID string `bun:"type:CHAR(26),pk,notnull,unique"` // ID of the status this mention originates from - StatusID string `bun:"type:CHAR(26),notnull"` + StatusID string `bun:"type:CHAR(26),notnull,nullzero"` Status *Status `bun:"rel:belongs-to"` // When was this mention created? CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"` // When was this mention last updated? UpdatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"` // What's the internal account ID of the originator of the mention? - OriginAccountID string `bun:"type:CHAR(26),notnull"` + OriginAccountID string `bun:"type:CHAR(26),notnull,nullzero"` OriginAccount *Account `bun:"rel:belongs-to"` // What's the AP URI of the originator of the mention? OriginAccountURI string `bun:",notnull"` // What's the internal account ID of the mention target? - TargetAccountID string `bun:"type:CHAR(26),notnull"` + TargetAccountID string `bun:"type:CHAR(26),notnull,nullzero"` TargetAccount *Account `bun:"rel:belongs-to"` // Prevent this mention from generating a notification? Silent bool |