warn user instead of disallowing unsupported servers

This commit is contained in:
ari melody 2024-06-22 16:35:41 +01:00
parent 1da2789684
commit e6c5bcf3c3
4 changed files with 15 additions and 31 deletions

View file

@ -93,25 +93,6 @@ export async function getTimeline(last_post_id) {
}).then(res => res.json());
return data;
let posts = [];
for (let i in data) {
const post_data = data[i];
const post = await parsePost(post_data, 1);
if (!post) {
if (post === null || post === undefined) {
if (post_data.id) {
console.warn("Failed to parse post #" + post_data.id);
} else {
console.warn("Failed to parse post:");
console.warn(post_data);
}
}
continue;
}
posts.push(post);
}
return posts;
}
export async function getPost(post_id, num_replies) {