summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/mention.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-05-21 15:48:26 +0200
committerLibravatar GitHub <noreply@github.com>2021-05-21 15:48:26 +0200
commitd839f27c306eedebdc7cc0311f35b8856cc2bb24 (patch)
tree7a11a3a641f902991d26771c4d3f8e836a2bce7e /internal/gtsmodel/mention.go
parentupdate progress (diff)
downloadgotosocial-d839f27c306eedebdc7cc0311f35b8856cc2bb24.tar.xz
Follows and relationships (#27)
* Follows -- create and undo, both remote and local * Statuses -- federate new posts, including media, attachments, CWs and image descriptions.
Diffstat (limited to 'internal/gtsmodel/mention.go')
-rw-r--r--internal/gtsmodel/mention.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/gtsmodel/mention.go b/internal/gtsmodel/mention.go
index 8e56a1b36..3abe9c915 100644
--- a/internal/gtsmodel/mention.go
+++ b/internal/gtsmodel/mention.go
@@ -38,6 +38,14 @@ type Mention struct {
TargetAccountID string `pg:",notnull"`
// Prevent this mention from generating a notification?
Silent bool
+
+ /*
+ NON-DATABASE CONVENIENCE FIELDS
+ These fields are just for convenience while passing the mention
+ around internally, to make fewer database calls and whatnot. They're
+ not meant to be put in the database!
+ */
+
// NameString is for putting in the namestring of the mentioned user
// before the mention is dereferenced. Should be in a form along the lines of:
// @whatever_username@example.org
@@ -48,4 +56,6 @@ type Mention struct {
//
// This will not be put in the database, it's just for convenience.
MentionedAccountURI string `pg:"-"`
+ // A pointer to the gtsmodel account of the mentioned account.
+ GTSAccount *Account `pg:"-"`
}