diff options
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/UserThread.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/UserThread.java b/juick-www/src/main/java/com/juick/www/controllers/UserThread.java index 780b2ed1..46ac485f 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/UserThread.java +++ b/juick-www/src/main/java/com/juick/www/controllers/UserThread.java @@ -16,6 +16,7 @@ */ package com.juick.www.controllers; +import com.juick.Tag; import com.juick.formatters.PlainTextFormatter; import com.juick.server.util.HttpForbiddenException; import com.juick.server.util.HttpNotFoundException; @@ -38,6 +39,7 @@ import javax.inject.Inject; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; /** * @@ -123,6 +125,10 @@ public class UserThread { if (StringUtils.isNotEmpty(twitterName)) { headers += "<meta name=\"twitter:creator\" content=\"@" + twitterName + "\" />\n"; } + if (msg.getTags().size() > 0) { + headers += "<meta name=\"Keywords\" content=\"" + msg.getTags().stream().map(Tag::getName) + .collect(Collectors.joining(", ")) + "\" />\n"; + } model.addAttribute("headers", headers); model.addAttribute("contentStyle", "margin-left: 0; width: 100%"); model.addAttribute("isModerator", visitor.getUid() == 3694); |