From 67c5a5eedcd1bf68ade678935392eace59af1c37 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 8 May 2018 15:21:50 +0300 Subject: 5 tags per message limit --- juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'juick-server-jdbc/src/main/java/com/juick') diff --git a/juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java index 880f18b9..3c35f5b3 100644 --- a/juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java +++ b/juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java @@ -192,6 +192,9 @@ public class TagServiceImpl extends BaseJdbcService implements TagService { .filter(currentTags::contains) .map(tag -> tag.TID) .collect(Collectors.toList()); + if (newTags.size() - idsForDelete.size() >= 5) { + return currentTags; + } if (!idsForDelete.isEmpty()) getNamedParameterJdbcTemplate().update( -- cgit v1.2.3