fix(comments) : show notified threads in inbox and stop edit notifications

This commit is contained in:
2026-10-12 23:03:17 +07:00 Unverified
parent 1fe35546d3
commit 05350e7aab
8 changed files with 316 additions and 35 deletions
-3
View File
@@ -1,5 +1,3 @@
import { after } from "next/server";
import { sendCommentPush } from "@/lib/comments/push";
import { authorizeComment, commentId, getCommentViewer, listComments, mutateComment, requireCommentViewer } from "@/lib/comments/repository";
import { publishComment } from "@/lib/comments/publish";
import { errorResponse, requireSameOrigin } from "@/lib/security/http";
@@ -21,7 +19,6 @@ export async function PATCH(request: Request, context: Context) {
const viewer = await requireCommentViewer();
await limitRequest("comment-publish", viewer.id, 20);
const result = await publishComment(request, viewer, { id: commentId((await context.params).id) });
after(async () => { await sendCommentPush(result.id, result.version).catch(() => console.error("Comment notification failed")); });
return Response.json(result);
} catch (cause) { return errorResponse(cause); }
}