Browse Source

Compatibility with TB 91: copyFileMessage(), bug 1715433.

master
Jörg Knobloch 11 months ago
parent
commit
42b53a0daf
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      addon/content/TbHelper.js

+ 7
- 3
addon/content/TbHelper.js View File

@ -1,6 +1,5 @@
// This file is under GNU General Public License 3.0
var { AppConstants } = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
var { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
var { fixIterator } = ChromeUtils.import("chrome://pEp4Tb/content/modules/iteratorUtils.jsm");
@ -107,7 +106,7 @@ const TbHelper = {
try {
controller.log.info(`Deleting old message with key ${msgHdr.messageKey}`);
let msgArray;
if (parseInt(AppConstants.MOZ_APP_VERSION, 10) >= 85) {
if (controller.MOZ_APP_VERSION >= 85) {
msgArray = [msgHdr];
} else {
msgArray = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
@ -164,7 +163,12 @@ const TbHelper = {
const msgCopyService = Cc["@mozilla.org/messenger/messagecopyservice;1"]
.getService(Ci.nsIMsgCopyService);
msgCopyService.CopyFileMessage(tempFile, msgFolder, msgHdr, false, 0, "", copyListener, null);
if (controller.MOZ_APP_VERSION >= 91) {
// Made lowercase in https://bugzilla.mozilla.org/show_bug.cgi?id=1715433.
msgCopyService.copyFileMessage(tempFile, msgFolder, msgHdr, false, 0, "", copyListener, null);
} else {
msgCopyService.CopyFileMessage(tempFile, msgFolder, msgHdr, false, 0, "", copyListener, null);
}
},
isOwnIdentity(email) {


Loading…
Cancel
Save