summaryrefslogtreecommitdiff
path: root/internal/processing/federation
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-04-24 14:24:43 +0200
committerLibravatar GitHub <noreply@github.com>2022-04-24 14:24:43 +0200
commit0d05bf473ba8e8b64a9e1b0977898581c5a3137d (patch)
treee17d1519ce291ff3c99bdaf4fb3f6b6ed6d951e0 /internal/processing/federation
parent[feature] Implement media v2 endpoint to accommodate Tusky 17 (#480) (diff)
downloadgotosocial-0d05bf473ba8e8b64a9e1b0977898581c5a3137d.tar.xz
[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
Diffstat (limited to 'internal/processing/federation')
-rw-r--r--internal/processing/federation/getstatus.go4
1 files changed, 2 insertions, 2 deletions
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 := &gtsmodel.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))
}