fix(IMAP): don't add whitespaces to drafts#12196
Conversation
|
Could someone review? |
|
Thanks for your pr 👍 So, it's not the regex that you mentioned in the issue? |
76fb4f9 to
19d46fd
Compare
Yes, I was wrong. The regex is innocent. |
19d46fd to
90bcbf4
Compare
|
Failed integration tests should be fixed now. |
ad2cf9f to
4c97bd8
Compare
|
Thanks a lot for your PR 👍 Sorry that the review takes so long 🙈 Your change works. The commits b6d019b / https://github.com/nextcloud/mail/blame/c55f4d6f633b2865a2ecb16a30abdeddd1d4424c/lib/message.php doesn't give me any hint why the newlines were added. I'd hope @ChristophWurst has an idea? |
There was a problem hiding this comment.
Pull request overview
This PR adjusts how ImapMessageFetcher concatenates MIME part bodies so it only inserts separators between parts (instead of always appending trailing \n\n / <br><br>), and updates the integration tests to match the new plaintext body output.
Changes:
- Update plain-text body concatenation to avoid unconditional trailing
\n\nand stop trimming part contents. - Update HTML body concatenation to avoid unconditional trailing
<br><br>. - Update integration test expectations for
getPlainBody()newline behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
lib/IMAP/ImapMessageFetcher.php |
Changes how plaintext/HTML bodies are appended, inserting separators only when previous content exists. |
tests/Integration/IMAP/ImapMessageFetcherIntegrationTest.php |
Adjusts assertions to match the updated body formatting (no unconditional trailing blank lines). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@max65482 mind to have a look at copilot's suggestions? Rebase against latest main would also be nice. |
4c97bd8 to
ad044cf
Compare
|
/backport to stable5.7 |
|
It looks like it won't automerge when codecov fails. |
Signed-off-by: Maximilian Martin <maximilian_martin@gmx.de>
ad044cf to
d8b4a85
Compare
Fixes #12190