aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-05-08 15:21:50 +0300
committerGravatar Vitaly Takmazov2018-05-08 15:21:50 +0300
commit67c5a5eedcd1bf68ade678935392eace59af1c37 (patch)
tree511c6765a4a03eb6ba98a4abd2886f9fd52b84d1 /juick-server-jdbc
parent28f91c88d2475c0e8f6b69f2c12200f4c43c98a0 (diff)
5 tags per message limit
Diffstat (limited to 'juick-server-jdbc')
-rw-r--r--juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java3
1 files changed, 3 insertions, 0 deletions
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(