From 720da5649b19c86701f81144b720b933e8b6fdac Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 24 Nov 2023 13:32:27 +0200 Subject: [PATCH] Don't auto-exec on disable QR --- public/scripts/extensions/quick-reply/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/scripts/extensions/quick-reply/index.js b/public/scripts/extensions/quick-reply/index.js index 5cb219660..3b40dfb16 100644 --- a/public/scripts/extensions/quick-reply/index.js +++ b/public/scripts/extensions/quick-reply/index.js @@ -561,6 +561,8 @@ function saveQROrder() { } async function onMessageReceived(index) { + if (!extension_settings.quickReply.quickReplyEnabled) return; + for (let i = 0; i < extension_settings.quickReply.numberOfSlots; i++) { const qr = extension_settings.quickReply.quickReplySlots[i]; if (qr?.autoExecute_botMessage) { @@ -573,6 +575,8 @@ async function onMessageReceived(index) { } async function onMessageSent(index) { + if (!extension_settings.quickReply.quickReplyEnabled) return; + for (let i = 0; i < extension_settings.quickReply.numberOfSlots; i++) { const qr = extension_settings.quickReply.quickReplySlots[i]; if (qr?.autoExecute_userMessage) {