[mastodon-client] Ignore capitalization for hashtag timeline

This commit is contained in:
Laura Hausmann 2023-10-15 21:56:13 +02:00
parent 4176ac20ac
commit bc08d8c92b
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605

View File

@ -62,7 +62,7 @@ export function setupEndpointsTimeline(router: Router): void {
"/v1/timelines/tag/:hashtag",
auth(false, ['read:statuses']),
async (ctx, reply) => {
const tag = (ctx.params.hashtag ?? '').trim();
const tag = (ctx.params.hashtag ?? '').trim().toLowerCase();
const args = normalizeUrlQuery(argsToBools(limitToInt(ctx.query)), ['any[]', 'all[]', 'none[]']);
const res = await TimelineHelpers.getTagTimeline(tag, args.max_id, args.since_id, args.min_id, args.limit, args['any[]'] ?? [], args['all[]'] ?? [], args['none[]'] ?? [], args.only_media, args.local, args.remote, ctx);
ctx.body = await NoteConverter.encodeMany(res, ctx);