From 29547ce8aba63454e84d277b0597fb2764e8cb23 Mon Sep 17 00:00:00 2001 From: kim Date: Mon, 3 Nov 2025 21:16:42 +0100 Subject: [bugfix] more RSS validation issues (#4517) Fixes some validation issues relating to author information often expected to be valid email addresses, which our @displayname@username is not. There's still a few more validation issues, but honestly if we're going have better support I think it might be worth dropping gorilla/feeds for our own tagged XML / JSON structs. Also does a bunch of housekeeping in the typeutils package removing error returns where never used / only ever logged, removing unused contexts etc. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4517 Co-authored-by: kim Co-committed-by: kim --- internal/typeutils/internaltofrontend_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/typeutils/internaltofrontend_test.go') diff --git a/internal/typeutils/internaltofrontend_test.go b/internal/typeutils/internaltofrontend_test.go index 6c77c3f26..7a6a4f50d 100644 --- a/internal/typeutils/internaltofrontend_test.go +++ b/internal/typeutils/internaltofrontend_test.go @@ -27,6 +27,7 @@ import ( "code.superseriousbusiness.org/gotosocial/internal/config" "code.superseriousbusiness.org/gotosocial/internal/db" "code.superseriousbusiness.org/gotosocial/internal/gtsmodel" + "code.superseriousbusiness.org/gotosocial/internal/typeutils" "code.superseriousbusiness.org/gotosocial/internal/util" "code.superseriousbusiness.org/gotosocial/testrig" "github.com/stretchr/testify/suite" @@ -1684,8 +1685,7 @@ func (suite *InternalToFrontendTestSuite) TestStatusToAPIStatusPendingApproval() func (suite *InternalToFrontendTestSuite) TestVideoAttachmentToFrontend() { testAttachment := suite.testAttachments["local_account_1_status_4_attachment_2"] - apiAttachment, err := suite.typeconverter.AttachmentToAPIAttachment(suite.T().Context(), testAttachment) - suite.NoError(err) + apiAttachment := typeutils.AttachmentToAPIAttachment(testAttachment) b, err := json.MarshalIndent(apiAttachment, "", " ") suite.NoError(err) -- cgit v1.2.3