summaryrefslogtreecommitdiff
path: root/internal/db
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/db
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/db')
-rw-r--r--internal/db/bundb/status.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/db/bundb/status.go b/internal/db/bundb/status.go
index d564ed528..1783723bb 100644
--- a/internal/db/bundb/status.go
+++ b/internal/db/bundb/status.go
@@ -70,7 +70,7 @@ func (s *statusDB) GetStatusByID(ctx context.Context, id string) (*gtsmodel.Stat
return s.cache.GetByID(id)
},
func(status *gtsmodel.Status) error {
- return s.newStatusQ(status).Where("status.id = ?", id).Scan(ctx)
+ return s.newStatusQ(status).Where("LOWER(status.id) = LOWER(?)", id).Scan(ctx)
},
)
}