diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index d4a400b8..fa1f77f2 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -104,6 +104,21 @@
"description": ""
},
+ "prefs_OptionText_reply_all": {
+ "message": "Reply to All",
+ "description": ""
+ },
+
+ "prefs_OptionText_reply_sender": {
+ "message": "Reply to Sender",
+ "description": ""
+ },
+
+ "prefs_OptionText_reply_type": {
+ "message": "Reply type",
+ "description": ""
+ },
+
"prefsInfoTitle": {
"message": "Important Information",
"description": ""
diff --git a/_locales/it/messages.json b/_locales/it/messages.json
index ab2093a1..021972f7 100644
--- a/_locales/it/messages.json
+++ b/_locales/it/messages.json
@@ -104,6 +104,21 @@
"description": ""
},
+ "prefs_OptionText_reply_all": {
+ "message": "Rispondi a tutti",
+ "description": ""
+ },
+
+ "prefs_OptionText_reply_sender": {
+ "message": "Rispondi al mittente",
+ "description": ""
+ },
+
+ "prefs_OptionText_reply_type": {
+ "message": "Modalità di riposta",
+ "description": ""
+ },
+
"prefsInfoTitle": {
"message": "Informazioni Importanti",
"description": ""
diff --git a/mzta-background.js b/mzta-background.js
index 9aefe907..f52ab3a5 100644
--- a/mzta-background.js
+++ b/mzta-background.js
@@ -24,7 +24,7 @@ for (let messageTab of messageTabs) {
}
-messenger.runtime.onMessage.addListener((message, sender, sendResponse) => {
+messenger.runtime.onMessage.addListener(async (message, sender, sendResponse) => {
// Check what type of message we have received and invoke the appropriate
// handler function.
if (message && message.hasOwnProperty("command")){
@@ -55,8 +55,15 @@ messenger.runtime.onMessage.addListener((message, sender, sendResponse) => {
});
const paragraphsHtmlString = paragraphs.map(p => p.outerHTML).join("");
//console.log('paragraphsHtmlString: ' + paragraphsHtmlString);
+ let prefs = await browser.storage.sync.get({reply_type: 'reply_all'});
+ console.log('reply_type: ' + prefs.reply_type);
+ let replyType = 'replyToAll';
+ if(prefs.reply_type === 'reply_sender'){
+ replyType = 'replyToSender';
+ }
+ console.log('replyType: ' + replyType);
browser.messageDisplay.getDisplayedMessage(message.tabId).then((mailMessage) => {
- browser.compose.beginReply(mailMessage.id, "replyToAll", {
+ browser.compose.beginReply(mailMessage.id, replyType, {
type: "reply",
body: paragraphsHtmlString,
isPlainText: false,
diff --git a/options/mzta-options.html b/options/mzta-options.html
index b595480e..434b39de 100644
--- a/options/mzta-options.html
+++ b/options/mzta-options.html
@@ -12,7 +12,13 @@
__MSG_prefs_OptionText_chatgpt_win_width__
-
+
+