-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Use FullName in Emails to address the recipient if possible #31527
Conversation
Co-authored-by: silverwind <me@silverwind.io>
return u.Email | ||
} | ||
|
||
return fmt.Sprintf("%s <%s>", mime.QEncoding.Encode("utf-8", add.Name), add.Address) |
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 not encode the sanitizedDisplayName
beforehand?
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.
Because then the mime encoding is undone
@@ -413,6 +415,34 @@ func (u *User) DisplayName() string { | |||
return u.Name | |||
} | |||
|
|||
var emailToReplacer = strings.NewReplacer( |
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.
emailNameReplacer
?
I don't see any reason why we should only use it for To
.
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.
Right now we do, if it gets reused some can just rename it
* giteaofficial/main: Use FullName in Emails to address the recipient if possible (go-gitea#31527) Don't show hidden labels when filling out an issue template (go-gitea#31576) [skip ci] Updated translations via Crowdin Convert frontend code to typescript (go-gitea#31559) [skip ci] Updated translations via Crowdin
Before we had just the plain mail address as recipient. But now we provide additional Information for the Mail clients.
Sponsored by Kithara Software GmbH