aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/juick/TopManager.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/juick/TopManager.java b/src/main/java/com/juick/TopManager.java
index 0bece960..3a6cafe1 100644
--- a/src/main/java/com/juick/TopManager.java
+++ b/src/main/java/com/juick/TopManager.java
@@ -22,11 +22,15 @@ import com.juick.model.Message;
import com.juick.model.Tag;
import com.juick.model.User;
import com.juick.service.MessagesService;
+
+import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import javax.inject.Inject;
+
+import java.net.URI;
import java.util.List;
import java.util.stream.Collectors;
@@ -46,7 +50,7 @@ public class TopManager {
Message jmsg = messagesService.getMessage(m).orElseThrow(IllegalStateException::new);
List<String> tags = jmsg.getTags().stream().map(Tag::getName).map(String::toLowerCase).collect(Collectors.toList());
if (!tags.contains("juick")) {
- CommandResult result = commandsManager.commandRecommend(serviceUser, null, String.valueOf(m));
+ CommandResult result = commandsManager.commandRecommend(serviceUser, URI.create(StringUtils.EMPTY), String.valueOf(m));
logger.info("Popular message {}: {}", m, result.getText());
}
});