From d70f4e166dd9ce2f11a6ac2d7a2e500515657041 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:47:03 +0200 Subject: [feature/frontend] Allow setting alt-text for avatar + header (#3086) --- internal/web/thread.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'internal/web/thread.go') diff --git a/internal/web/thread.go b/internal/web/thread.go index 05bd63ebe..492d40103 100644 --- a/internal/web/thread.go +++ b/internal/web/thread.go @@ -29,7 +29,6 @@ import ( apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model" apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util" "github.com/superseriousbusiness/gotosocial/internal/gtserror" - "github.com/superseriousbusiness/gotosocial/internal/oauth" ) func (m *Module) threadGETHandler(c *gin.Context) { @@ -88,16 +87,8 @@ func (m *Module) threadGETHandler(c *gin.Context) { // text/html has been requested. Proceed with getting the web view of the status. - // Don't require auth for web endpoints, but do take it if it was provided. - // authed.Account might end up nil here, but that's fine in case of public pages. - authed, err := oauth.Authed(c, false, false, false, false) - if err != nil { - apiutil.WebErrorHandler(c, gtserror.NewErrorUnauthorized(err, err.Error()), m.processor.InstanceGetV1) - return - } - // Fetch the target account so we can do some checks on it. - targetAccount, errWithCode := m.processor.Account().GetLocalByUsername(ctx, authed.Account, targetUsername) + targetAccount, errWithCode := m.processor.Account().GetWeb(ctx, targetUsername) if errWithCode != nil { apiutil.WebErrorHandler(c, errWithCode, instanceGet) return -- cgit v1.2.3