From 4080ecbdb18bf67275317bdcfa5bcc52d3ac94e4 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 27 May 2018 22:46:08 +0300 Subject: Refactor tag parsing --- juick-common/src/main/java/com/juick/server/CommandsManager.java | 4 ++-- juick-common/src/main/java/com/juick/service/TagService.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'juick-common/src') diff --git a/juick-common/src/main/java/com/juick/server/CommandsManager.java b/juick-common/src/main/java/com/juick/server/CommandsManager.java index 3ba071e2..9ff0fdbb 100644 --- a/juick-common/src/main/java/com/juick/server/CommandsManager.java +++ b/juick-common/src/main/java/com/juick/server/CommandsManager.java @@ -100,7 +100,7 @@ public class CommandsManager { return commandResult; } } - List tags = tagService.fromString(input, false); + List tags = tagService.fromString(input); if (tags.size() > 5) { return CommandResult.fromString("Sorry, 5 tags maximum."); } @@ -480,7 +480,7 @@ public class CommandsManager { int rid = NumberUtils.toInt(args[4], 0); String txt = StringUtils.defaultString(args[5]); Message msg = messagesService.getMessage(mid); - List messageTags = tagService.fromString(txt, true); + List messageTags = tagService.fromString(txt); if (messageTags.size() > 0) { if (user.getUid() != msg.getUser().getUid()) { return CommandResult.fromString("It is not your message"); diff --git a/juick-common/src/main/java/com/juick/service/TagService.java b/juick-common/src/main/java/com/juick/service/TagService.java index 7cd7768f..17b6c5de 100644 --- a/juick-common/src/main/java/com/juick/service/TagService.java +++ b/juick-common/src/main/java/com/juick/service/TagService.java @@ -49,7 +49,7 @@ public interface TagService { List updateTags(int mid, Collection newTags); - List fromString(String txt, boolean tagsOnly); + List fromString(String txt); List getMessageTags(int mid); -- cgit v1.2.3