summaryrefslogtreecommitdiff
path: root/internal/processing/fedi/status.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-12-01 15:27:15 +0100
committerLibravatar GitHub <noreply@github.com>2023-12-01 15:27:15 +0100
commit0e2c34219112db3a6b7801530a946fd5b1bbb111 (patch)
tree6a5557373dbfc9edc80de941b13e870a8af32881 /internal/processing/fedi/status.go
parent[bugfix] in fedi API CreateStatus(), handle case of data-race and return earl... (diff)
downloadgotosocial-0e2c34219112db3a6b7801530a946fd5b1bbb111.tar.xz
[bugfix/chore] `Announce` reliability updates (#2405)v0.13.0-rc1
* [bugfix/chore] `Announce` updates * test update * fix tests * TestParseAnnounce * update comments * don't lock/unlock, change function signature * naming stuff * don't check domain block twice * UnwrapIfBoost * beep boop
Diffstat (limited to 'internal/processing/fedi/status.go')
-rw-r--r--internal/processing/fedi/status.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/processing/fedi/status.go b/internal/processing/fedi/status.go
index 8082c79bc..1c1af9cb4 100644
--- a/internal/processing/fedi/status.go
+++ b/internal/processing/fedi/status.go
@@ -51,6 +51,11 @@ func (p *Processor) StatusGet(ctx context.Context, requestedUser string, statusI
return nil, gtserror.NewErrorNotFound(errors.New(text))
}
+ if status.BoostOfID != "" {
+ const text = "status is a boost wrapper"
+ return nil, gtserror.NewErrorNotFound(errors.New(text))
+ }
+
visible, err := p.filter.StatusVisible(ctx, requester, status)
if err != nil {
return nil, gtserror.NewErrorInternalError(err)
@@ -106,6 +111,11 @@ func (p *Processor) StatusRepliesGet(
return nil, gtserror.NewErrorNotFound(errors.New(text))
}
+ if status.BoostOfID != "" {
+ const text = "status is a boost wrapper"
+ return nil, gtserror.NewErrorNotFound(errors.New(text))
+ }
+
// Parse replies collection ID from status' URI with onlyOtherAccounts param.
onlyOtherAccStr := "only_other_accounts=" + strconv.FormatBool(onlyOtherAccounts)
collectionID, err := url.Parse(status.URI + "/replies?" + onlyOtherAccStr)