Fix federated interactions and reply threads

This commit is contained in:
cyph3rasi
2026-03-07 21:27:22 -08:00
parent 1e2da4f2da
commit 5d524a0354
21 changed files with 241 additions and 59 deletions
+7 -4
View File
@@ -164,10 +164,13 @@ export default function Home() {
const handleLike = async (postId: string, currentLiked: boolean) => {
if (!did || !handle) return;
if (currentLiked) {
await signedAPI.unlikePost(postId, did, handle);
} else {
await signedAPI.likePost(postId, did, handle);
const res = currentLiked
? await signedAPI.unlikePost(postId, did, handle)
: await signedAPI.likePost(postId, did, handle);
if (!res.ok) {
const data = await res.json().catch(() => ({}));
throw new Error(data.error || 'Failed to update like');
}
};