-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Double signature in composed Email #16178
Conversation
2961bbe
to
3bb374a
Compare
Codecov Report
@@ Coverage Diff @@
## develop #16178 +/- ##
===========================================
+ Coverage 51.86% 56.77% +4.91%
===========================================
Files 744 756 +12
Lines 66193 66847 +654
Branches 5555 5703 +148
===========================================
+ Hits 34329 37954 +3625
+ Misses 27830 25428 -2402
+ Partials 4034 3465 -569
Flags with carried forward coverage won't be shown. Click here to find out more. |
Don't know how I missed this in #12878 😓 Looks good. |
Re-do of frappe#12520 Undone by frappe#12878 Changes done to reflect current state of version-13 Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
c6fa4e3
to
2d8c9ae
Compare
2d8c9ae
to
4fa99ed
Compare
This fix adds a signature forcibly if found under the sender's User.email_signature or default outgoing email account's signature field. The previous method of adding a comment into the Email didn't work since Quill would discard comments before setting them. Adding signatures in get_formatted_html didn't seem apt since it's used in QueueBuilder to re-construct the Email before processing the Email Queue. This meant that the email content that was added in the Communication record would not be final. Now, we treat the signature as part of the Communication content.
4fa99ed
to
0ef99c3
Compare
Seems like this had nothing to do with your PR @sagarvora. At first glance, it did seem so though. The refactor works fine. Sorry about the false alarm. |
This is added to handle purposely removed signature or custom signatures added via the Email Composer or via the email.make API
@Mergifyio backport version-13-hotfix |
🟠 Waiting for conditions to match
|
✅ Backports have been created
|
This is a semi-automatic backport of pull request #16178 done by [Mergify](https://mergify.com).
Quill doesn't deal with HTML for the most part. This means that the comment was being stripped off before it ever reached the backend. I don't know if the
<!-- signature-included -->
comment ever worked 🥲.Before
The previous behaviour was to add User's or Email Account's signature via Desk, and if one doesn't exist while processing the Email in the backend add Email Account signature if one exists. Signature added in the backend would not reflect in the Communication or Email Queue records 🥲.
After
The proposed implementation adds a signature (sender's or email account's signature) if one doesn't already exist in the Email content. This behaviour is not triggered when the Email Composer is used via Desk, or via the
email.make
API.Re-do of #12520; Undone by #12878