diff options
author | 2021-05-27 16:06:24 +0200 | |
---|---|---|
committer | 2021-05-27 16:06:24 +0200 | |
commit | 40add686913b7eb6edd5a780e37e7513b43a337f (patch) | |
tree | 75549dff97e5a15f732a505d4d00aa7a686bdad8 /internal/typeutils/internaltoas.go | |
parent | Faves (#31) (diff) | |
download | gotosocial-40add686913b7eb6edd5a780e37e7513b43a337f.tar.xz |
Notifications (#34)
Notifications working for:
* Mentions
* Faves
* New follow requests
* New followers
Diffstat (limited to 'internal/typeutils/internaltoas.go')
-rw-r--r-- | internal/typeutils/internaltoas.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/typeutils/internaltoas.go b/internal/typeutils/internaltoas.go index 821720e0d..805f69afb 100644 --- a/internal/typeutils/internaltoas.go +++ b/internal/typeutils/internaltoas.go @@ -262,12 +262,12 @@ func (c *converter) StatusToAS(s *gtsmodel.Status) (vocab.ActivityStreamsNote, e // check if author account is already attached to status and attach it if not // if we can't retrieve this, bail here already because we can't attribute the status to anyone - if s.GTSAccount == nil { + if s.GTSAuthorAccount == nil { a := >smodel.Account{} if err := c.db.GetByID(s.AccountID, a); err != nil { return nil, fmt.Errorf("StatusToAS: error retrieving author account from db: %s", err) } - s.GTSAccount = a + s.GTSAuthorAccount = a } // create the Note! @@ -328,9 +328,9 @@ func (c *converter) StatusToAS(s *gtsmodel.Status) (vocab.ActivityStreamsNote, e } // attributedTo - authorAccountURI, err := url.Parse(s.GTSAccount.URI) + authorAccountURI, err := url.Parse(s.GTSAuthorAccount.URI) if err != nil { - return nil, fmt.Errorf("StatusToAS: error parsing url %s: %s", s.GTSAccount.URI, err) + return nil, fmt.Errorf("StatusToAS: error parsing url %s: %s", s.GTSAuthorAccount.URI, err) } attributedToProp := streams.NewActivityStreamsAttributedToProperty() attributedToProp.AppendIRI(authorAccountURI) @@ -357,9 +357,9 @@ func (c *converter) StatusToAS(s *gtsmodel.Status) (vocab.ActivityStreamsNote, e status.SetActivityStreamsTag(tagProp) // parse out some URIs we need here - authorFollowersURI, err := url.Parse(s.GTSAccount.FollowersURI) + authorFollowersURI, err := url.Parse(s.GTSAuthorAccount.FollowersURI) if err != nil { - return nil, fmt.Errorf("StatusToAS: error parsing url %s: %s", s.GTSAccount.FollowersURI, err) + return nil, fmt.Errorf("StatusToAS: error parsing url %s: %s", s.GTSAuthorAccount.FollowersURI, err) } publicURI, err := url.Parse(asPublicURI) |