From 0d05bf473ba8e8b64a9e1b0977898581c5a3137d Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 24 Apr 2022 14:24:43 +0200 Subject: [bug] Fix status API / status web API being case sensitive (#481) * make getStatus by id case-insensitive * test get status case insensitive * init config before log --- internal/processing/federation/getstatus.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/processing') diff --git a/internal/processing/federation/getstatus.go b/internal/processing/federation/getstatus.go index 1651516b5..3a32ffa59 100644 --- a/internal/processing/federation/getstatus.go +++ b/internal/processing/federation/getstatus.go @@ -62,8 +62,8 @@ func (p *processor) GetStatus(ctx context.Context, requestedUsername string, req // get the status out of the database here s := >smodel.Status{} if err := p.db.GetWhere(ctx, []db.Where{ - {Key: "id", Value: requestedStatusID}, - {Key: "account_id", Value: requestedAccount.ID}, + {Key: "id", Value: requestedStatusID, CaseInsensitive: true}, + {Key: "account_id", Value: requestedAccount.ID, CaseInsensitive: true}, }, s); err != nil { return nil, gtserror.NewErrorNotFound(fmt.Errorf("database error getting status with id %s and account id %s: %s", requestedStatusID, requestedAccount.ID, err)) } -- cgit v1.2.3