Browse Source

Finalise "(do not) protect subject" functionality.

master 1.1.103
Jörg Knobloch 9 months ago
parent
commit
5adc9d14ac
3 changed files with 3 additions and 5 deletions
  1. +0
    -2
      addon/content/dialogs/options.xhtml
  2. +1
    -1
      addon/content/pEpForThunderbird.js
  3. +2
    -2
      addon/content/pepmessengercompose.js

+ 0
- 2
addon/content/dialogs/options.xhtml View File

@ -36,12 +36,10 @@
preference="extensions.pEp.storeAllSecurely"
label-localekey="optionsStoreAllSecurely"
tooltiptext="optionsStoreAllSecurelyTooltip" />
<!--
<checkbox id="protectSubjects"
preference="extensions.pEp.protectSubjects"
label-localekey="optionsProtectSubjects"
tooltiptext="optionsProtectSubjectsTooltip" />
-->
<checkbox id="pEpSync"
preference="extensions.pEp.pEpSync"
label-localekey="optionsEnableSync"


+ 1
- 1
addon/content/pEpForThunderbird.js View File

@ -106,7 +106,7 @@ class pEpForThunderbird extends pEp {
MailServices.mfn.addListener(this, Ci.nsIMsgFolderNotificationService.msgAdded);
// Check adapter version.
const MIN_REQUIRED_VERSION = "0.21.0";
const MIN_REQUIRED_VERSION = "0.22.0";
let version = this.synchronise(this.serverVersion());
this.log.info(`Adapter version ${version.api_version} (${version.name})`);
let win = Services.wm.getMostRecentWindow("mail:3pane");


+ 2
- 2
addon/content/pepmessengercompose.js View File

@ -30,7 +30,7 @@ function _parseAddress(address) {
function isPrivate(rating) {
// starting from `PEP_rating_reliable` in
// `_PEP_rating` in the engine message_api.h.
return rating && rating > 5;
return rating && rating >= 6;
}
// Needs to be a `var` since it's used in bootstrap.js.
@ -554,7 +554,7 @@ var pEpComposer = {
// This is a hack. We tell the engine whether we want protected subjects,
// but when we pass the MIME tree back in pEpMimeEncrypt.js, the engine-provided
// headers are just ignored. So we manipulate the header here manually which isn't ideal.
if (true || pEpController.protectSubjects) { // else branch disabled pending JSON-183.
if (pEpController.protectSubjects) {
// We unconditionally replace the subject.
compFields.subject = PEP_ENCRYPTED_SUBJECT;
} else {


Loading…
Cancel
Save