summaryrefslogtreecommitdiff
path: root/internal/web/thread.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/web/thread.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/web/thread.go')
-rw-r--r--internal/web/thread.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/web/thread.go b/internal/web/thread.go
index 523cf7579..20145cfcd 100644
--- a/internal/web/thread.go
+++ b/internal/web/thread.go
@@ -20,6 +20,7 @@ package web
import (
"context"
"encoding/json"
+ "errors"
"fmt"
"net/http"
"strings"
@@ -124,6 +125,13 @@ func (m *Module) threadGETHandler(c *gin.Context) {
return
}
+ // Don't render boosts/reblogs as top-level statuses.
+ if status.Reblog != nil {
+ err := errors.New("status is a boost wrapper / reblog")
+ apiutil.WebErrorHandler(c, gtserror.NewErrorNotFound(err), instanceGet)
+ return
+ }
+
// Fill in the rest of the thread context.
context, errWithCode := m.processor.Status().WebContextGet(ctx, targetStatusID)
if errWithCode != nil {