fix(pair): fail fast before qr setup lookup

This commit is contained in:
Agustin Rivera
2026-04-03 19:09:14 +00:00
committed by Peter Steinberger
parent 83e5fe5e8b
commit 9bb97b54fe

View File

@@ -642,7 +642,7 @@ export default definePluginEntry({
if (authLabelResult.error) {
return { text: `Error: ${authLabelResult.error}` };
}
if (!action && isMissingPairingScope(gatewayClientScopes)) {
if ((!action || action === "qr") && isMissingPairingScope(gatewayClientScopes)) {
return buildMissingPairingScopeReply();
}
@@ -653,9 +653,6 @@ export default definePluginEntry({
const authLabel = authLabelResult.label ?? "auth";
if (action === "qr") {
if (isMissingPairingScope(gatewayClientScopes)) {
return buildMissingPairingScopeReply();
}
const channel = ctx.channel;
const target = resolveQrReplyTarget(ctx);
let autoNotifyArmed = false;