fix: Check if signature already exist

This commit is contained in:
Suraj Shetty 2023-05-31 09:55:39 +05:30
parent ca85524f91
commit abb479f89f

View file

@ -747,7 +747,10 @@ frappe.views.CommunicationComposer = class {
this.content_set = true;
}
message += await this.get_signature(sender_email || null);
const signature = await this.get_signature(sender_email || "");
if (!this.content_set || !strip_html(message).includes(strip_html(signature))) {
message += signature;
}
if (this.is_a_reply && !this.reply_set) {
message += this.get_earlier_reply();