From 94cbe1120e0364d0994989dff7722d0bf6e2ac07 Mon Sep 17 00:00:00 2001 From: nicole mikołajczyk Date: Mon, 14 Jul 2025 17:12:47 +0200 Subject: [bugfix] use correct interaction type for pre-accepted interaction requests (#4325) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk # Description > If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements. > > If this is a documentation change, please briefly describe what you've changed and why. This pull request fixes `InteractionType` incorrectly set for pre-approved interaction requests. ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [ ] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4325 Co-authored-by: nicole mikołajczyk Co-committed-by: nicole mikołajczyk --- internal/processing/workers/fromfediapi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/processing/workers/fromfediapi.go') diff --git a/internal/processing/workers/fromfediapi.go b/internal/processing/workers/fromfediapi.go index 926825b69..1a42a04fb 100644 --- a/internal/processing/workers/fromfediapi.go +++ b/internal/processing/workers/fromfediapi.go @@ -316,7 +316,7 @@ func (p *fediAPI) CreateStatus(ctx context.Context, fMsg *messages.FromFediAPI) InteractingAccountID: status.AccountID, InteractingAccount: status.Account, InteractionURI: status.URI, - InteractionType: gtsmodel.InteractionLike, + InteractionType: gtsmodel.InteractionReply, Reply: status, URI: uris.GenerateURIForAccept(status.InReplyToAccount.Username, id), AcceptedAt: time.Now(), @@ -657,7 +657,7 @@ func (p *fediAPI) CreateAnnounce(ctx context.Context, fMsg *messages.FromFediAPI InteractingAccountID: boost.AccountID, InteractingAccount: boost.Account, InteractionURI: boost.URI, - InteractionType: gtsmodel.InteractionLike, + InteractionType: gtsmodel.InteractionAnnounce, Announce: boost, URI: uris.GenerateURIForAccept(boost.BoostOfAccount.Username, id), AcceptedAt: time.Now(), -- cgit v1.2.3