aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/EmailManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-01-12 11:46:40 +0300
committerGravatar Vitaly Takmazov2023-01-12 11:56:11 +0300
commite377357b00cdb151aa20d96a0ce7a5f1a8bbe9c9 (patch)
tree8e776a6705e71eb72e8ea48bb3d345bc0e96fa6c /src/main/java/com/juick/EmailManager.java
parent84f6e27f7e563bcb58815575546c52c944f0cd3e (diff)
Telegram: parse_mode=html
Diffstat (limited to 'src/main/java/com/juick/EmailManager.java')
-rw-r--r--src/main/java/com/juick/EmailManager.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/juick/EmailManager.java b/src/main/java/com/juick/EmailManager.java
index a62d31f3..62584273 100644
--- a/src/main/java/com/juick/EmailManager.java
+++ b/src/main/java/com/juick/EmailManager.java
@@ -68,6 +68,8 @@ public class EmailManager implements NotificationListener {
private ObjectMapper jsonMapper;
@Inject
private WebApp webApp;
+ @Value("${web_domain:localhost}")
+ private String webDomain;
@Value("${service_email:}")
private String serviceEmail;
@@ -145,7 +147,7 @@ public class EmailManager implements NotificationListener {
headers.put("In-Reply-To", String.format("<%d.%d@juick.com>", original.getMid(), original.getRid()));
}
}
- String plainText = webApp.renderPlaintext(formatPost(msg), formatUrl(msg)).orElseThrow(IllegalStateException::new);
+ String plainText = webApp.renderPlaintext(formatPost(msg, webDomain), formatUrl(msg)).orElseThrow(IllegalStateException::new);
String hash = userService.getHashByUID(userService.getUserByEmail(email).getUid());
String htmlText = webApp.renderHtml(MessageUtils.formatHtml(msg), formatUrl(msg), msg, hash).orElseThrow(IllegalStateException::new);
sendEmail(StringUtils.EMPTY, email, subject, plainText, htmlText, headers);