updates to some key functions

This commit is contained in:
tsmethurst
2021-06-15 16:38:49 +02:00
parent b4288f3c47
commit 740086576c
34 changed files with 488 additions and 522 deletions

View File

@ -65,7 +65,9 @@ type TypeConverter interface {
// TagToMasto converts a gts model tag into its mastodon (frontend) representation for serialization on the API.
TagToMasto(t *gtsmodel.Tag) (model.Tag, error)
// StatusToMasto converts a gts model status into its mastodon (frontend) representation for serialization on the API.
StatusToMasto(s *gtsmodel.Status, statusAuthor *gtsmodel.Account, requestingAccount *gtsmodel.Account, boostOfAccount *gtsmodel.Account, replyToAccount *gtsmodel.Account, reblogOfStatus *gtsmodel.Status) (*model.Status, error)
//
// Requesting account can be nil.
StatusToMasto(s *gtsmodel.Status, requestingAccount *gtsmodel.Account) (*model.Status, error)
// VisToMasto converts a gts visibility into its mastodon equivalent
VisToMasto(m gtsmodel.Visibility) model.Visibility
// InstanceToMasto converts a gts instance into its mastodon equivalent for serving at /api/v1/instance