aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-05-27 22:46:08 +0300
committerGravatar Vitaly Takmazov2018-05-27 22:46:08 +0300
commit4080ecbdb18bf67275317bdcfa5bcc52d3ac94e4 (patch)
treef862479b9a0a3424193c01a593f80c673902641f /juick-common/src/main/java
parent15c52d91884988dc3c714739f901b510eb6ffc56 (diff)
Refactor tag parsing
Diffstat (limited to 'juick-common/src/main/java')
-rw-r--r--juick-common/src/main/java/com/juick/server/CommandsManager.java4
-rw-r--r--juick-common/src/main/java/com/juick/service/TagService.java2
2 files changed, 3 insertions, 3 deletions
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<Tag> tags = tagService.fromString(input, false);
+ List<Tag> 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<Tag> messageTags = tagService.fromString(txt, true);
+ List<Tag> 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<Tag> updateTags(int mid, Collection<Tag> newTags);
- List<Tag> fromString(String txt, boolean tagsOnly);
+ List<Tag> fromString(String txt);
List<TagStats> getMessageTags(int mid);