aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/protocol')
-rw-r--r--juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java b/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java
index 1bac9fce..68c7c37c 100644
--- a/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java
+++ b/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java
@@ -8,6 +8,7 @@ import com.juick.Tag;
import com.juick.User;
import com.juick.formatters.PlainTextFormatter;
import com.juick.server.*;
+import com.juick.server.helpers.TagStats;
import com.juick.server.protocol.annotation.UserCommand;
import com.juick.util.TagUtils;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -179,10 +180,10 @@ public class JuickProtocol {
@UserCommand(pattern = "\\*", help = "* - Show your tags")
public ProtocolReply commandTags(User currentUser, String... args) {
- List<Tag> tags = TagQueries.getUserTagsAll(sql, currentUser.getUid());
+ List<TagStats> tags = TagQueries.getTagsStats(sql, currentUser.getUid());
String msg = "Your tags: (tag - messages)\n" +
tags.stream()
- .map(t -> String.format("\n*%s - %d", t.getName(), t.UsageCnt)).collect(Collectors.joining());
+ .map(t -> String.format("\n*%s - %d", t.getTag().getName(), t.getUsageCount())).collect(Collectors.joining());
return new ProtocolReply(msg, Optional.empty());
}