diff options
author | 2021-08-02 19:06:44 +0200 | |
---|---|---|
committer | 2021-08-02 19:06:44 +0200 | |
commit | 0386a28b5a3c4212320e8a96ddd14c54b65a2090 (patch) | |
tree | 3bfdf198934215ac64acac9d66d952baf65c2752 /internal/typeutils/internaltofrontend.go | |
parent | fix breaky linky (diff) | |
download | gotosocial-0386a28b5a3c4212320e8a96ddd14c54b65a2090.tar.xz |
Frodo swaggins (#126)
* more swagger fun
* document a whole bunch more stuff
* more swagger yayyyyyyy
* progress + go fmt
Diffstat (limited to 'internal/typeutils/internaltofrontend.go')
-rw-r--r-- | internal/typeutils/internaltofrontend.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go index 03e071981..1283e718a 100644 --- a/internal/typeutils/internaltofrontend.go +++ b/internal/typeutils/internaltofrontend.go @@ -488,7 +488,7 @@ func (c *converter) StatusToMasto(s *gtsmodel.Status, requestingAccount *gtsmode statusInteractions = si } - return &model.Status{ + apiStatus := &model.Status{ ID: s.ID, CreatedAt: s.CreatedAt.Format(time.RFC3339), InReplyToID: s.InReplyToID, @@ -508,7 +508,6 @@ func (c *converter) StatusToMasto(s *gtsmodel.Status, requestingAccount *gtsmode Reblogged: statusInteractions.Reblogged, Pinned: s.Pinned, Content: s.Content, - Reblog: mastoRebloggedStatus, Application: mastoApplication, Account: mastoAuthorAccount, MediaAttachments: mastoAttachments, @@ -518,7 +517,13 @@ func (c *converter) StatusToMasto(s *gtsmodel.Status, requestingAccount *gtsmode Card: mastoCard, // TODO: implement cards Poll: mastoPoll, // TODO: implement polls Text: s.Text, - }, nil + } + + if mastoRebloggedStatus != nil { + apiStatus.Reblog = &model.StatusReblogged{Status: mastoRebloggedStatus} + } + + return apiStatus, nil } // VisToMasto converts a gts visibility into its mastodon equivalent |