Fix profile URLs not working for http route

This commit is contained in:
Lim Chee Aun 2024-08-01 20:18:44 +08:00
parent 57db8778a4
commit 818f58b460

View file

@ -24,12 +24,14 @@ export default function HttpRoute() {
// Check if status returns 200
try {
const { instance, id } = statusObject;
if (id) {
const { masto } = api({ instance });
const status = await masto.v1.statuses.$select(id).fetch();
if (status) {
window.location.hash = statusURL + '?view=full';
return;
}
}
} catch (e) {}
// Fallback to search