Skip to content

Commit 0acff82

Browse files
committed
add warning support for no body
1 parent 024ef74 commit 0acff82

File tree

1 file changed

+5
-0
lines changed
  • x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email

1 file changed

+5
-0
lines changed

x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/email/EmailTemplate.java

+5
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ public Email.Builder render(TextTemplateEngine engine, Map<String, Object> model
148148
renderedHtml = htmlSanitizer.sanitize(renderedHtml);
149149
builder.htmlBody(renderedHtml);
150150
}
151+
152+
if(htmlBody == null && textBody == null && Strings.isNullOrEmpty(textWarnings) == false){
153+
builder.textBody(textWarnings);
154+
}
155+
151156
return builder;
152157
}
153158

0 commit comments

Comments
 (0)