Repository navigation
fix(mail): attach inline logo for manual HTML bodies - #64959
shrikargs7-cloud wants to merge 1 commit into
Conversation
f55d676 to
00ed23d
Compare
susnux
left a comment
There was a problem hiding this comment.
Please follow the pull request template - including proper conventional commit message.
Otherwise some general comments:
00ed23d to
9597ae5
Compare
|
*"Thanks for the feedback! I've updated the code, removed the broad
exception catch, fixed the server call, and updated the PR title to follow
conventional commits."*
…On Thu, Oct 1, 2026 at 3:39 PM Ferdinand Thiessen ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Please follow the pull request template - including proper conventional
commit message.
Otherwise some general comments:
------------------------------
In lib/private/Mail/Message.php
<#64959 (comment)>:
> @@ -225,6 +225,21 @@ public function getPlainBody(): string {
public function setHtmlBody(string $body): IMessage {
if (!$this->plainTextOnly) {
$this->symfonyEmail->html($body);
+
+ // Fix for #64957: Automatically attach the inline logo if the app
that comment to ref an issue makes no sense in production code. should
rather be in a regression test.
------------------------------
In lib/private/Mail/Message.php
<#64959 (comment)>:
> + /** @var \OCP\Theming\IThemingDefaults $themingDefaults */
+ $themingDefaults = \OC::$server->get(\OCP\Theming\IThemingDefaults::class);
doc block not needed as inferred by param.
Please do not use OC::$server but OCP\Server::get
------------------------------
In lib/private/Mail/Message.php
<#64959 (comment)>:
> + } catch (\Exception $e) {
+ // Failsafe in case ThemingDefaults is unavailable
This should rather catch the container exception - but this should also
never be the case so can be ignored.
Currently this catched far too broad
—
Reply to this email directly, view it on GitHub
<#64959?email_source=notifications&email_token=B3MASHGMYFZKSWUYL4Y54NL5RYUMJA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKMZXG44DINRRGQ42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#pullrequestreview-5377846149>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/B3MASHDYDTQKGBESZKJ35QT5RYUMJAVCNFSNUABEKJSXA33TNF2G64TZHM3DAMRUGMYTSNZ3JFZXG5LFHM2TMNJRGUZDKOJSG2QXMAQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
salmart-dev
left a comment
There was a problem hiding this comment.
Given the author's profile and the code, it seems to me like this may be an automated submission. In that case, the PR is not respecting our AI Contribution policy
| $this->symfonyEmail->html($body); | ||
|
|
||
| if (str_contains($body, 'cid:logo')) { | ||
| $themingDefaults = \OCP\Server::get(\OCP\Theming\IThemingDefaults::class); |
There was a problem hiding this comment.
The interface does not exist
Fixes nextcloud#64957 Signed-off-by: Shrikar <shrikargs7@gmail.com> Assisted-by: Antigravity:gemini-2.5-pro
9597ae5 to
defbbf8
Compare
|
@shrikargs7-cloud thanks for the PR, the issue has been fixed with #65422 |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Description
Automatically attach the
cid:logoinline image if an app bypassesuseTemplate()and sets an HTML body containing the logo directly. Resolves the regression introduced in #62933 where emails sent by these apps were missing the logo.This PR was prepared with the assistance of an AI coding agent to quickly identify the
\OCP\DefaultsAPI endpoint and resolve the regression.Related Issue
Fixes #64957
Types of changes