diff options
author | 2022-04-24 14:24:43 +0200 | |
---|---|---|
committer | 2022-04-24 14:24:43 +0200 | |
commit | 0d05bf473ba8e8b64a9e1b0977898581c5a3137d (patch) | |
tree | e17d1519ce291ff3c99bdaf4fb3f6b6ed6d951e0 /internal/processing | |
parent | [feature] Implement media v2 endpoint to accommodate Tusky 17 (#480) (diff) | |
download | gotosocial-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')
-rw-r--r-- | internal/processing/federation/getstatus.go | 4 |
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 := >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)) } |