(In reply to Patrick Brunschwig from comment #13) > Assuming that the patch here works as expected, in my eyes, the code in enigmailMsgComposeOverlay.js#3933-3944 is not needed anymore and should be removed. Actually, I prefer not to touch the compose processing. `fixMessageSubject()` is called here https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#4019 after `setOriginalSubject()` and I have the impression that that code will add a second "Re:" prefix under certain circumstances: https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#630 https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#654. I'm not sure why this function has code to add a "Re:" prefix when "normal" Thunderbird reply processing does so already. IOW, the lines in question should be removed in the context of code review of the entire area.
Bug 1633251 Comment 14 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Patrick Brunschwig from comment #13) > Assuming that the patch here works as expected, in my eyes, the code in enigmailMsgComposeOverlay.js#3933-3944 is not needed anymore and should be removed. Actually, I prefer not to touch the compose processing. `fixMessageSubject()` is called here https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#4019 after `setOriginalSubject()` and I have the impression that that code will add a second "Re:" prefix under certain circumstances: https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#630 https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#654. I'm not sure why this function has code to add a "Re:" prefix when "normal" Thunderbird reply processing does so already. IOW, the lines in question should be removed in the context of code review of the entire area. EDIT: I believe there is some room for improvement. For example: https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#647-648 could be replaced by using `msgHdr.mime2DecodedSubject`to start with. https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#650-652 doesn't appear to be correct. Why only check "Re: " here? As far as I can tell, those three lines can be removed since there is a check a few lines further down.
(In reply to Patrick Brunschwig from comment #13) > Assuming that the patch here works as expected, in my eyes, the code in enigmailMsgComposeOverlay.js#3933-3944 is not needed anymore and should be removed. Actually, I prefer not to touch the compose processing. `fixMessageSubject()` is called here https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#4019 after `setOriginalSubject()` and I have the impression that that code will add a second "Re:" prefix under certain circumstances: https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#630 https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#654. I'm not sure why this function has code to add a "Re:" prefix when "normal" Thunderbird reply processing does so already. IOW, the lines in question should be removed in the context of code review of the entire area. EDIT: I believe there is some room for improvement. For example: https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#647-648 could be replaced by using `msgHdr.mime2DecodedSubject`to start with. https://searchfox.org/comm-central/rev/41733433edd6a3a2d0369ce03eb4fab62bf38c3b/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#650-652 doesn't appear to be correct. Why only check "Re: " here? As far as I can tell, those three lines can be removed since there is a check a few lines further down. EDIT 2: It's also not clear why `getOriginalMsgUri()` distinguishes between `gMsgCompose.compFields.draftId` and ` gMsgCompose.originalMsgURI`. IMHO, using the latter would suffice. But that's all material for another bug.