fix(v2/approvals): render correct title + selected label after click
Approval cards bypass the deliverMessage path that populates pending_questions, so the post-click lookup found nothing and the card edit fell back to "❓ Question" + the raw option value ("approve"/"reject"). Store title and normalized options on pending_approvals as well, and look up either table via a shared getAskQuestionRender helper so the chat-sdk post-click edit and the Discord interaction callback render the per-card title and the selectedLabel (e.g. "✅ Approved"). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,7 +29,9 @@ export const migration003: Migration = {
|
||||
platform_id TEXT,
|
||||
platform_message_id TEXT,
|
||||
expires_at TEXT,
|
||||
status TEXT NOT NULL DEFAULT 'pending'
|
||||
status TEXT NOT NULL DEFAULT 'pending',
|
||||
title TEXT NOT NULL DEFAULT '',
|
||||
options_json TEXT NOT NULL DEFAULT '[]'
|
||||
);
|
||||
|
||||
CREATE INDEX idx_pending_approvals_action_status
|
||||
|
||||
Reference in New Issue
Block a user