-
Notifications
You must be signed in to change notification settings - Fork 3
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
♻️ Add username in email #314
base: main
Are you sure you want to change the base?
Conversation
@@ -31,7 +31,7 @@ | |||
<!-- Main Message --> | |||
<mj-text> | |||
{% blocktrans %} | |||
{{username}} invited you as an {{role}} on the following document : | |||
{{username}} {{email}} invited you as an {{role}} on the following document : |
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.
{{username}} ({{email}}) invited you with the role "{{role}}" on the following document :
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.
why do we want to add the email here?
access.document.email_invitation( | ||
language, access.user.email, access.role, self.request.user.email | ||
language, access.user.email, access.role, username_sender, email_sender |
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.
Semantically, shouldn't it be:
language, access.user.email, access.role, username_sender, email_sender | |
language, access.user.email, access.role, sender_name, sender_email |
The term "username" is usually used with another meaning.
@@ -520,7 +520,7 @@ def get_abilities(self, user): | |||
"versions_retrieve": can_get_versions, | |||
} | |||
|
|||
def email_invitation(self, language, email, role, username_sender): | |||
def email_invitation(self, language, email, role, username_sender, email_sender): |
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.
def email_invitation(self, language, email, role, username_sender, email_sender): | |
def email_invitation(self, language, email, role, username_sender, sender_email): |
@@ -31,7 +31,7 @@ | |||
<!-- Main Message --> | |||
<mj-text> | |||
{% blocktrans %} | |||
{{username}} invited you as an {{role}} on the following document : | |||
{{username}} {{email}} invited you as an {{role}} on the following document : |
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.
why do we want to add the email here?
username_sender = self.request.user.full_name | ||
email_sender = self.request.user.email |
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.
username_sender = self.request.user.full_name | |
email_sender = self.request.user.email | |
sender_name = self.request.user.full_name | |
sender_email = self.request.user.email |
username_sender = self.request.user.full_name | ||
email_sender = self.request.user.email |
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.
username_sender = self.request.user.full_name | |
email_sender = self.request.user.email | |
sender_name = self.request.user.full_name | |
sender_email = self.request.user.email |
Purpose
For the moment we are using the sender's email in the email, but we have sometimes the full name of the sender.
Proposal
Use the fullname instead of the email if it is available.