fix: change params is blank not sent email

This commit is contained in:
yystopf 2021-11-10 10:05:35 +08:00
parent 685d2b80f2
commit 937603d0f2
2 changed files with 2 additions and 0 deletions

View File

@ -188,6 +188,7 @@ class MessageTemplate::IssueChanged < MessageTemplate
end
def self.get_email_message_content(receiver, operator, issue, change_params)
return '', '', '' if change_params.blank?
if receiver.user_template_message_setting.present?
return '', '', '' unless receiver.user_template_message_setting.email_body["CreateOrAssign::IssueChanged"]
end

View File

@ -100,6 +100,7 @@ class MessageTemplate::PullRequestChanged < MessageTemplate
end
def self.get_email_message_content(receiver, operator, pull_request, change_params)
return '', '', '' if change_params.blank?
if receiver.user_template_message_setting.present?
return '', '', '' unless receiver.user_template_message_setting.email_body["CreateOrAssign::PullRequestChanged"]
end