From 0e2c34219112db3a6b7801530a946fd5b1bbb111 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:27:15 +0100 Subject: [bugfix/chore] `Announce` reliability updates (#2405) * [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 --- internal/web/thread.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/web') 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 { -- cgit v1.3