add more code comments, move media description check back to media process in status create

This commit is contained in:
kim 2024-12-23 15:04:58 +00:00
commit b212cd0169
5 changed files with 91 additions and 16 deletions

View file

@ -31,7 +31,8 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/log"
)
// GetOwnStatus ...
// GetOwnStatus fetches the given status with ID,
// and ensures that it belongs to given requester.
func (p *Processor) GetOwnStatus(
ctx context.Context,
requester *gtsmodel.Account,
@ -46,14 +47,6 @@ func (p *Processor) GetOwnStatus(
return nil, gtserror.NewErrorInternalError(err)
}
if target == nil {
const text = "target status not found"
return nil, gtserror.NewErrorNotFound(
errors.New(text),
text,
)
}
switch {
case target == nil:
const text = "target status not found"