fix(plugins): tighten interactive callback handling

This commit is contained in:
Vincent Koc
2026-03-13 14:22:55 -07:00
parent 50df0bb00e
commit 0f4775148c
8 changed files with 132 additions and 3 deletions

View File

@@ -187,7 +187,7 @@ export async function dispatchPluginInteractiveHandler(params: {
const dedupeKey =
params.channel === "telegram" ? params.callbackId?.trim() : params.interactionId?.trim();
if (dedupeKey && callbackDedupe.check(dedupeKey)) {
if (dedupeKey && callbackDedupe.peek(dedupeKey)) {
return { matched: true, handled: true, duplicate: true };
}
@@ -253,6 +253,9 @@ export async function dispatchPluginInteractiveHandler(params: {
});
}
const resolved = await result;
if (dedupeKey) {
callbackDedupe.check(dedupeKey);
}
return {
matched: true,