diff --git a/oauth/src/components/CommentForm.jsx b/oauth/src/components/CommentForm.jsx index 2f7133d..96f5561 100644 --- a/oauth/src/components/CommentForm.jsx +++ b/oauth/src/components/CommentForm.jsx @@ -46,8 +46,13 @@ export default function CommentForm({ user, agent, onCommentPosted }) { } } - // Post the record - await atproto.putRecord(null, record, agent) + // Post the record using the same API as ask-AI + await agent.api.com.atproto.repo.putRecord({ + repo: record.repo, + collection: record.collection, + rkey: record.rkey, + record: record.record + }) // キャッシュを無効化 collections.invalidateCache(env.collection) @@ -59,6 +64,12 @@ export default function CommentForm({ user, agent, onCommentPosted }) { if (onCommentPosted) { onCommentPosted() } + + // Show success message briefly + setText('✓ コメントが投稿されました') + setTimeout(() => { + setText('') + }, 2000) } catch (err) { setError(err.message) @@ -112,7 +123,7 @@ export default function CommentForm({ user, agent, onCommentPosted }) {