[mastodon-client] Allow unauthorized uses to access /accounts/:id/statuses

This commit is contained in:
Laura Hausmann 2023-09-24 20:28:37 +02:00
parent f6d0183668
commit f8be4533df
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605

View File

@ -145,12 +145,7 @@ export function apiAccountMastodon(router: Router): void {
async (ctx) => {
try {
const auth = await authenticate(ctx.headers.authorization, null);
const user = auth[0] ?? undefined;
if (!user) {
ctx.status = 401;
return;
}
const user = auth[0] ?? null;
const userId = convertId(ctx.params.id, IdType.IceshrimpId);
const cache = UserHelpers.getFreshAccountCache();