|
|
@ -443,11 +443,11 @@ var pEpHdrView = { |
|
|
|
let keyList = message.opt_fields.find((e) => e.key == "X-KeyList"); |
|
|
|
if (keyList) msgHdr.setStringProperty("pEpKeyList", keyList.value); |
|
|
|
msgHdr.setStringProperty("pEpPrivacyRating", rating.toString(10)); |
|
|
|
this.updatePrivacy(this.win, msgHdr, rating); |
|
|
|
this.updatePrivacy(this.win, msgHdr, rating, keyList.value); |
|
|
|
pEpController.log.debug("updatePrivacyFromMessage: set rating to ", rating, keyList, isDraftorTemplate); |
|
|
|
}, |
|
|
|
|
|
|
|
updatePrivacy(win, msgHdr, rating) { |
|
|
|
updatePrivacy(win, msgHdr, rating, keyList = null) { |
|
|
|
// Remove old display.
|
|
|
|
const oldNode = win.document.getElementById(TAG_PRIVACY_NODE_ID); |
|
|
|
if (oldNode) { |
|
|
@ -465,7 +465,11 @@ var pEpHdrView = { |
|
|
|
newNode.classList.add(pEpController.colorFromRating(rating)); |
|
|
|
newNode.id = TAG_PRIVACY_NODE_ID; |
|
|
|
|
|
|
|
const privacyLabel = this.getLocaleMessage(pEpController.textFromRating(rating)); |
|
|
|
let privacyLabel = this.getLocaleMessage(pEpController.textFromRating(rating)); |
|
|
|
if (keyList && Services.prefs.getBoolPref("extensions.pEp.showFPR", false)) { |
|
|
|
// eslint-disable-next-line prefer-template
|
|
|
|
privacyLabel += " - FPR: " + keyList; |
|
|
|
} |
|
|
|
const privacyTextNode = win.document.createTextNode(privacyLabel); |
|
|
|
newNode.appendChild(privacyTextNode); |
|
|
|
|
|
|
|