#89 solve edit/reply encrypted message/draft

This commit is contained in:
the-djmaze 2022-02-04 09:54:59 +01:00
parent 686138ae15
commit 96de0be977
2 changed files with 9 additions and 9 deletions

View file

@ -614,7 +614,8 @@ export class MessageModel extends AbstractModel {
* @returns {string}
*/
bodyAsHTML() {
if (this.body) {
// if (this.body && !this.body.querySelector('iframe[src*=decrypt]')) {
if (this.body && !this.body.querySelector('iframe')) {
let clone = this.body.cloneNode(true),
attr = 'data-html-editor-font-wrapper';
clone.querySelectorAll('blockquote.rl-bq-switcher').forEach(
@ -628,6 +629,9 @@ export class MessageModel extends AbstractModel {
);
return clone.innerHTML;
}
if (this.isPgpEncrypted()) {
return this.html() || plainToHtml(this.plain());
}
return '';
}