diff options
author | 2021-08-30 13:38:06 +0200 | |
---|---|---|
committer | 2021-08-30 13:38:06 +0200 | |
commit | 6adec1ae4d95489e4e11c3dfc3be15a634b3a60f (patch) | |
tree | 0f123565cdaafac55425eeb9171dd0ef988c6a63 /internal/processing/status/fave.go | |
parent | Merge branch 'struct_validation' of github.com:superseriousbusiness/gotosocia... (diff) | |
download | gotosocial-6adec1ae4d95489e4e11c3dfc3be15a634b3a60f.tar.xz |
more work on struct validation
Diffstat (limited to 'internal/processing/status/fave.go')
-rw-r--r-- | internal/processing/status/fave.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/processing/status/fave.go b/internal/processing/status/fave.go index 2badf83b3..410c94056 100644 --- a/internal/processing/status/fave.go +++ b/internal/processing/status/fave.go @@ -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 |