通知邮件支持用户不存在时发送base_url

This commit is contained in:
xiaoxiaoqiong 2022-06-01 16:11:18 +08:00
parent a7ce3f3728
commit 15a0b85ae6
1 changed files with 2 additions and 0 deletions

View File

@ -25,6 +25,7 @@ class MessageTemplate::CustomTip < MessageTemplate
content.gsub!("{#{k}}", v)
notification_url.gsub!("{#{k}}", v)
end
notification_url.gsub!('{baseurl}', base_url)
return receivers_string(receivers), content, notification_url
rescue => e
Rails.logger.info("MessageTemplate::CustomTip.get_message_content [ERROR] #{e}")
@ -42,6 +43,7 @@ class MessageTemplate::CustomTip < MessageTemplate
content.gsub!('{receiver}', receiver&.real_name)
title.gsub!('{platform}', PLATFORM)
content.gsub!('{platform}', PLATFORM)
content.gsub!('{baseurl}', base_url)
return receiver&.mail, title, content
rescue => e