-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(ShareAPI): Send mails for mail shares by default #48381
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
Conversation
33e46ad to
6553268
Compare
provokateurin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix makes sense, curious how it broke though.
6553268 to
8103393
Compare
|
/backport to stable30 |
8103393 to
410854f
Compare
410854f to
3f7528b
Compare
e2fa7e1 to
9f0eda3
Compare
|
Why rebase it so often? |
Some tests that seem unrelated (cypress especially are failing consistently)... Re-basing triggers a rerun, but also adds the latest updates on master in case something that broke the tests has been resolved. (Because a bunch of other PRs are failing tests too)... Now taking a closer to see if something is indeed broken. |
9f0eda3 to
aab671f
Compare
nfebe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks "File Requests"
server/apps/files_sharing/lib/Controller/ShareAPIController.php
Lines 721 to 727 in 363ba6b
| if (is_string($shareWith) && $shareType === IShare::TYPE_EMAIL) { | |
| // If sending a mail have been requested, validate the mail address | |
| if ($share->getMailSend() && !$this->mailer->validateMailAddress($shareWith)) { | |
| throw new OCSNotFoundException($this->l->t('Please specify a valid email address')); | |
| } | |
| $share->setSharedWith($shareWith); | |
| } |
Why?
- File requests are sent with an empty string for
shareWithwhich the backend uses to check if a shareWith value is available (poorly so) - The file requests shareType is 4, which is mail share and I am not sure why that is.
aab671f to
91a3ce1
Compare
provokateurin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops
91a3ce1 to
e089e40
Compare
e089e40 to
a154393
Compare
|
/compile |
Agree, we can not change default behavior as this would be a breaking change. |
dd82bef to
c1b0f46
Compare
c1b0f46 to
e69c1a5
Compare
It looks like, the frontend it needs to provide the `sendMail` param for the backend to decide wether mails would be sent. Our UI does not have that at the moment so it should default to sending emails always for mail shares. Not exactly sure how this was handled earlier but this is a good starting point. Resolves : #48012 Signed-off-by: fenn-cs <[email protected]>
e69c1a5 to
e2d2a17
Compare
|
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.) |
Summary
It looks like, the frontend it needs to provide the
sendMailparam for the backend to decide whether mails would be sent.Our UI does not have that at the moment so it should default to sending emails always for mail shares.
Not exactly sure how this was handled earlier but this is a good starting point.
Resolves : #48012
Checklist