Created
January 30, 2014 01:00
-
-
Save shirosaki/8700643 to your computer and use it in GitHub Desktop.
Fix the bug that attachments of PGP/MIME are not showen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/package/mimeDecrypt.js b/package/mimeDecrypt.js | |
index 6b09272..84e384e 100644 | |
--- a/package/mimeDecrypt.js | |
+++ b/package/mimeDecrypt.js | |
@@ -165,10 +165,15 @@ PgpMimeDecrypt.prototype = { | |
if (this.uri.spec.search(/[\&\?]header=[a-zA-Z0-9]*$/) < 0 && | |
this.uri.spec.search(/[\&\?]part=[\.0-9]+/) < 0) { | |
- if (this.uri.spec.search(/[\&\?]header=filter\&.*$/) > 0) | |
+ // do not return so that jsmimeemitter can handle decrypted message | |
+ var emitterJs = false; | |
+ if (this.uri.spec.search(/[\&\?]header=filter\&emitter=js.*$/) >= 0) | |
+ emitterJs = true; | |
+ | |
+ if (this.uri.spec.search(/[\&\?]header=filter\&.*$/) > 0 && !emitterJs) | |
return; | |
- if (this.msgUriSpec) { | |
+ if (this.msgUriSpec && !emitterJs) { | |
var messenger = Cc["@mozilla.org/messenger;1"].getService(Ci.nsIMessenger); | |
var msgSvc = messenger.messageServiceFromURI(this.msgUriSpec); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment