aboutsummaryrefslogtreecommitdiff
path: root/juick-www
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-08-24 16:13:22 +0300
committerGravatar Vitaly Takmazov2017-08-24 16:13:22 +0300
commitcd334fb8161d2c364d72965473f7d6d729529546 (patch)
tree9611999b6d7ce55b34de49c105272453de30adad /juick-www
parenta98daeb0535608098f14c3c827768f6ee3087b84 (diff)
www: keywords
Diffstat (limited to 'juick-www')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/UserThread.java6
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);