Skip to content
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

[stable10] Backport of Fixing email sent to recipient using recipient… #34255

Merged
merged 1 commit into from
Feb 8, 2019

Conversation

sharidas
Copy link
Contributor

…s language code

The recipient, internal to owncloud instance should
recieve the email from the sender ( internal to owncloud )
in the language chosen by the recipient.

Signed-off-by: Sujith H sharidasan@owncloud.com

Description

While sharing the file/folders to internal user(s), the notification mail sent should be based on the language configured for recipient(s). Currently that is not the case. ownCloud instance is aware of the internal users. Hence this change tries to grab the recipients language stored in the preferences table. And then tries to compare with the senders setting. If they are different, then recipients language is used.

Related Issue

Motivation and Context

Try to use recipients language while sending notification mails. At least this should be for the internal users of oC instance.

How Has This Been Tested?

  • test environment:
  • As admin user create another user user1
  • Configure oC instance to send emails ( smtp email settings configuration )
  • Now change the language setting of user1 to Castellano
  • In the settings page of admin set the option Allow users to send mail notification for shared files
  • Create a new folder foo and share to user1
  • the admin user would see notify by email button. Click it.
  • An email would arrive in the language opted by user1

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@sharidas sharidas force-pushed the fix-recipient-mail-stable10 branch from 88ab55d to cc12573 Compare January 25, 2019 07:57
@sharidas sharidas self-assigned this Jan 25, 2019
@sharidas sharidas added this to the development milestone Jan 25, 2019
@sharidas sharidas requested a review from PVince81 January 25, 2019 07:57
@sharidas
Copy link
Contributor Author

Original PR #34144

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@codecov
Copy link

codecov bot commented Feb 7, 2019

Codecov Report

❗ No coverage uploaded for pull request base (stable10@8b07840). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##             stable10   #34255   +/-   ##
===========================================
  Coverage            ?   63.48%           
  Complexity          ?    19119           
===========================================
  Files               ?     1264           
  Lines               ?    75185           
  Branches            ?     1288           
===========================================
  Hits                ?    47731           
  Misses              ?    27076           
  Partials            ?      378
Flag Coverage Δ Complexity Δ
#javascript 53.31% <ø> (?) 0 <ø> (?)
#phpunit 64.57% <100%> (?) 19119 <0> (?)
Impacted Files Coverage Δ Complexity Δ
lib/private/Share/MailNotifications.php 100% <100%> (ø) 48 <0> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b07840...282112c. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 7, 2019

Codecov Report

Merging #34255 into stable10 will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #34255      +/-   ##
==============================================
+ Coverage        63.5%   63.51%   +<.01%     
- Complexity      19137    19138       +1     
==============================================
  Files            1264     1264              
  Lines           75278    75283       +5     
  Branches         1291     1291              
==============================================
+ Hits            47805    47814       +9     
+ Misses          27093    27089       -4     
  Partials          380      380
Flag Coverage Δ Complexity Δ
#javascript 53.32% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 64.6% <100%> (ø) 19138 <0> (+1) ⬆️
Impacted Files Coverage Δ Complexity Δ
lib/private/Share/MailNotifications.php 100% <100%> (ø) 48 <0> (+1) ⬆️
core/templates/internalmail.php 100% <0%> (+25%) 0% <0%> (ø) ⬇️
core/templates/internalaltmail.php 100% <0%> (+40%) 0% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 04cee42...17f85e6. Read the comment docs.

@phil-davis
Copy link
Contributor

More stupid drone errors. I will ask for rebase.

@phil-davis
Copy link
Contributor

@ownclouders rebase

@ownclouders
Copy link
Contributor

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently ⚠️

@ownclouders ownclouders force-pushed the fix-recipient-mail-stable10 branch from 282112c to de89350 Compare February 7, 2019 16:19
@ownclouders
Copy link
Contributor

Automated rebase with GitMate.io was successful! 🎉

@sharidas sharidas force-pushed the fix-recipient-mail-stable10 branch from de89350 to e0e0ce0 Compare February 7, 2019 16:38
@phil-davis
Copy link
Contributor

@ownclouders rebase

@ownclouders
Copy link
Contributor

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently ⚠️

…s language code

The recipient, internal to owncloud instance should
recieve the email from the sender ( internal to owncloud )
in the language chosen by the recipient.

Signed-off-by: Sujith H <sharidasan@owncloud.com>
@ownclouders ownclouders force-pushed the fix-recipient-mail-stable10 branch from e0e0ce0 to 17f85e6 Compare February 8, 2019 01:13
@ownclouders
Copy link
Contributor

Automated rebase with GitMate.io was successful! 🎉

@phil-davis phil-davis merged commit 345da18 into stable10 Feb 8, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix-recipient-mail-stable10 branch February 8, 2019 02:17
@PVince81 PVince81 modified the milestones: development, QA Apr 12, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants