fix(comments) : show notified threads in inbox and stop edit notifications
This commit is contained in:
@@ -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); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user