diff options
Diffstat (limited to 'internal/typeutils/converter.go')
-rw-r--r-- | internal/typeutils/converter.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/typeutils/converter.go b/internal/typeutils/converter.go index 9121564fb..cb69cba5d 100644 --- a/internal/typeutils/converter.go +++ b/internal/typeutils/converter.go @@ -71,7 +71,8 @@ type TypeConverter interface { // EmojiCategoryToAPIEmojiCategory converts a gts model emoji category into its api (frontend) representation. EmojiCategoryToAPIEmojiCategory(ctx context.Context, category *gtsmodel.EmojiCategory) (*apimodel.EmojiCategory, error) // TagToAPITag converts a gts model tag into its api (frontend) representation for serialization on the API. - TagToAPITag(ctx context.Context, t *gtsmodel.Tag) (apimodel.Tag, error) + // If stubHistory is set to 'true', then the 'history' field of the tag will be populated with a pointer to an empty slice, for API compatibility reasons. + TagToAPITag(ctx context.Context, t *gtsmodel.Tag, stubHistory bool) (apimodel.Tag, error) // StatusToAPIStatus converts a gts model status into its api (frontend) representation for serialization on the API. // // Requesting account can be nil. @@ -160,6 +161,8 @@ type TypeConverter interface { MentionToAS(ctx context.Context, m *gtsmodel.Mention) (vocab.ActivityStreamsMention, error) // EmojiToAS converts a gts emoji into a mastodon ns Emoji, suitable for federation EmojiToAS(ctx context.Context, e *gtsmodel.Emoji) (vocab.TootEmoji, error) + // TagToAS converts a gts model tag into a toot Hashtag, suitable for federation. + TagToAS(ctx context.Context, t *gtsmodel.Tag) (vocab.TootHashtag, error) // AttachmentToAS converts a gts model media attachment into an activity streams Attachment, suitable for federation AttachmentToAS(ctx context.Context, a *gtsmodel.MediaAttachment) (vocab.ActivityStreamsDocument, error) // FaveToAS converts a gts model status fave into an activityStreams LIKE, suitable for federation. |