aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/WebApp.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-10-23 05:37:09 +0300
committerGravatar Vitaly Takmazov2021-10-23 05:37:09 +0300
commit37e6d26e02d51a4de257200bbf207712fa3a6980 (patch)
treed010d09492475a310c0a4217af46799b120e70cb /src/main/java/com/juick/www/WebApp.java
parent26e4c1c4046914f064046229e927461d93bce534 (diff)
ImagesService refactoring
* Merge ImagesService and ImageUtils * add avatar metadata to RSS feeds
Diffstat (limited to 'src/main/java/com/juick/www/WebApp.java')
-rw-r--r--src/main/java/com/juick/www/WebApp.java24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/main/java/com/juick/www/WebApp.java b/src/main/java/com/juick/www/WebApp.java
index 08f9fcd0..cebedb9b 100644
--- a/src/main/java/com/juick/www/WebApp.java
+++ b/src/main/java/com/juick/www/WebApp.java
@@ -16,26 +16,33 @@
*/
package com.juick.www;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.stream.Stream;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+
import com.juick.model.Message;
import com.juick.model.Tag;
import com.juick.model.User;
import com.juick.service.TagService;
import com.mitchellbosecke.pebble.PebbleEngine;
import com.mitchellbosecke.pebble.template.PebbleTemplate;
+
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.resource.ResourceUrlProvider;
import org.springframework.web.util.UriComponentsBuilder;
-import javax.annotation.PostConstruct;
-import javax.inject.Inject;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.*;
-import java.util.stream.Stream;
-
/**
*
* @author Ugnich Anton
@@ -97,6 +104,7 @@ public class WebApp {
avatarBuilder.replacePath(getAvatarWebPath(user));
return avatarBuilder.build().toUriString();
}
+
public Optional<String> renderPlaintext(String body, String messageUrl) {
PebbleTemplate noteTemplate = pebbleEngine.getTemplate("email/plaintext");
Map<String, Object> context = new HashMap<>();