summaryrefslogtreecommitdiff
path: root/internal/processing/status/fave.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-08-30 13:38:06 +0200
committerLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-08-30 13:38:06 +0200
commit6adec1ae4d95489e4e11c3dfc3be15a634b3a60f (patch)
tree0f123565cdaafac55425eeb9171dd0ef988c6a63 /internal/processing/status/fave.go
parentMerge branch 'struct_validation' of github.com:superseriousbusiness/gotosocia... (diff)
downloadgotosocial-6adec1ae4d95489e4e11c3dfc3be15a634b3a60f.tar.xz
more work on struct validation
Diffstat (limited to 'internal/processing/status/fave.go')
-rw-r--r--internal/processing/status/fave.go6
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