fix: support replies on legacy databases

This commit is contained in:
lezi-fun committed 2026-08-12 20:05:29 +08:00
1 parent 68b58851e8
commit 3840bb3c54
4 files changed
+145 -24

No files matched your search

+7 -1
View File
@@ -51,7 +51,13 @@ export default function ReplyList({ postId, onRefresh }) {
if (!captcha || !captchaInput.trim()) { toast('请填写验证码', 'warning'); return; }
try {
// 答案由服务端 HMAC 校验
await API.createReply(postId, content.trim(), { id: captcha.id, answer: captchaInput.trim(), sig: captcha.sig }, replyTo);
await API.createReply(
postId,
content.trim(),
{ id: captcha.id, answer: captchaInput.trim(), sig: captcha.sig },
replyTo,
replyToObj?.username
);
setContent('');
setCaptchaInput('');
setReplyTo(null);