mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
more work on struct validation
This commit is contained in:
@@ -47,10 +47,8 @@ func (p *processor) Fave(ctx context.Context, requestingAccount *gtsmodel.Accoun
|
||||
if !visible {
|
||||
return nil, gtserror.NewErrorNotFound(errors.New("status is not visible"))
|
||||
}
|
||||
if targetStatus.VisibilityAdvanced != nil {
|
||||
if !targetStatus.VisibilityAdvanced.Likeable {
|
||||
return nil, gtserror.NewErrorForbidden(errors.New("status is not faveable"))
|
||||
}
|
||||
if !targetStatus.VisibilityAdvanced.Likeable {
|
||||
return nil, gtserror.NewErrorForbidden(errors.New("status is not faveable"))
|
||||
}
|
||||
|
||||
// first check if the status is already faved, if so we don't need to do anything
|
||||
|
Reference in New Issue
Block a user