From d35f6dd08dd01f08cea7c862f8a6aea078a8269c Mon Sep 17 00:00:00 2001 From: mic Date: Fri, 2 May 2025 11:27:10 +0200 Subject: [PATCH] Fix condition for handling replies from the compose window in message listener. See #353 --- js/mzta-chatgpt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/mzta-chatgpt.js b/js/mzta-chatgpt.js index 3d66c681..a6fcc333 100644 --- a/js/mzta-chatgpt.js +++ b/js/mzta-chatgpt.js @@ -652,7 +652,7 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => { current_message = message; current_tabId = message.tabId; current_mailMessageId = message.mailMessageId; - if(current_mailMessageId == -1) { // we are using the reply from the compose window! + if((current_mailMessageId == -1) && (current_action == '1')) { // we are using the reply from the compose window! current_action = '2'; // replace text } run();