mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[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
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user