diff options
author | 2021-06-17 18:02:33 +0200 | |
---|---|---|
committer | 2021-06-17 18:02:33 +0200 | |
commit | 82d9f88e424fffacfa9a9c1c26f2f702b97f3e3a (patch) | |
tree | 60379f8eb809e9019222f67a13b547e4a26bfc83 /internal/gtsmodel/status.go | |
parent | Timeline manager (#40) (diff) | |
download | gotosocial-82d9f88e424fffacfa9a9c1c26f2f702b97f3e3a.tar.xz |
Timeline improvements (#41)
Tidying up.
Parent/child statuses now display correctly in status/id/context.
Diffstat (limited to 'internal/gtsmodel/status.go')
-rw-r--r-- | internal/gtsmodel/status.go | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/internal/gtsmodel/status.go b/internal/gtsmodel/status.go index f5e332978..caa5a2a25 100644 --- a/internal/gtsmodel/status.go +++ b/internal/gtsmodel/status.go @@ -46,8 +46,12 @@ type Status struct { Local bool // which account posted this status? AccountID string `pg:"type:CHAR(26),notnull"` + // AP uri of the owner of this status + AccountURI string // id of the status this status is a reply to InReplyToID string `pg:"type:CHAR(26)"` + // AP uri of the status this status is a reply to + InReplyToURI string // id of the account that this status replies to InReplyToAccountID string `pg:"type:CHAR(26)"` // id of the status this status is a boost of @@ -97,20 +101,6 @@ type Status struct { GTSBoostedStatus *Status `pg:"-"` // Account of the boosted status GTSBoostedAccount *Account `pg:"-"` - - /* - AP NON-DATABASE FIELDS - - These are for convenience while passing the status around internally, - but these fields should *never* be put in the db. - */ - - // AP URI of the status being replied to. - // Useful when that status doesn't exist in the database yet and we still need to dereference it. - APReplyToStatusURI string `pg:"-"` - // The AP URI of the owner/creator of the status. - // Useful when that account doesn't exist in the database yet and we still need to dereference it. - APStatusOwnerURI string `pg:"-"` } // Visibility represents the visibility granularity of a status. @@ -150,12 +140,3 @@ type VisibilityAdvanced struct { // This status can be liked/faved Likeable bool `pg:"default:true"` } - -// RelevantAccounts denotes accounts that are replied to, boosted by, or mentioned in a status. -type RelevantAccounts struct { - StatusAuthor *Account - ReplyToAccount *Account - BoostedAccount *Account - BoostedReplyToAccount *Account - MentionedAccounts []*Account -} |