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

@ -28,6 +28,7 @@ func (p *processor) Create(account *gtsmodel.Account, application *gtsmodel.Appl
UpdatedAt: time.Now(),
Local: true,
AccountID: account.ID,
AccountURI: account.URI,
ContentWarning: form.SpoilerText,
ActivityStreamsType: gtsmodel.ActivityStreamsNote,
Sensitive: form.Sensitive,
@ -96,7 +97,7 @@ func (p *processor) Create(account *gtsmodel.Account, application *gtsmodel.Appl
}
// return the frontend representation of the new status to the submitter
mastoStatus, err := p.tc.StatusToMasto(newStatus, account, account, nil, newStatus.GTSReplyToAccount, nil)
mastoStatus, err := p.tc.StatusToMasto(newStatus, account)
if err != nil {
return nil, gtserror.NewErrorInternalError(fmt.Errorf("error converting status %s to frontend representation: %s", newStatus.ID, err))
}