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

注册邮件标题模板里的code未能正确替换 #910

Closed
MatchaCabin opened this issue Jun 4, 2024 · 1 comment
Closed

注册邮件标题模板里的code未能正确替换 #910

MatchaCabin opened this issue Jun 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MatchaCabin
Copy link

image
哪怕默认配置也一样的问题

原因在于这行,code替换在i18n.T方法就已经执行了,后续才和配置文件中的模板进行比较
如果模板存在,则直接使用了模板字符串,而这字符串中的code是没有进行过替换的

emailSubject := cmp.Or(app.Conf().Auth.Email.VerifySubject, i18n.T("Your Code - {{code}}", map[string]any{"code": code}))

@qwqcode qwqcode added the bug Something isn't working label Jun 8, 2024
@qwqcode
Copy link
Member

qwqcode commented Jun 9, 2024

v2.8.7 已发布,应该修复了这个问题,感谢反馈~

@qwqcode qwqcode closed this as completed Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants