From ec616c9dc078aa72fe577904dd6a2d2383fe4ad1 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 11 Aug 2017 11:02:37 +0300 Subject: xmpp: add pm in roster fix --- .../src/main/java/com/juick/service/PMQueriesServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-server-jdbc/src/main/java/com/juick/service') diff --git a/juick-server-jdbc/src/main/java/com/juick/service/PMQueriesServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/PMQueriesServiceImpl.java index 9e04b064..6b13f7bc 100644 --- a/juick-server-jdbc/src/main/java/com/juick/service/PMQueriesServiceImpl.java +++ b/juick-server-jdbc/src/main/java/com/juick/service/PMQueriesServiceImpl.java @@ -58,7 +58,7 @@ public class PMQueriesServiceImpl extends BaseJdbcService implements PMQueriesSe @Override public boolean addPMinRoster(final int uid, final String jid) { return getJdbcTemplate().update( - "INSERT INTO pm_inroster(user_id, jid) VALUES (?, ?)", uid, jid) > 0; + "INSERT INTO pm_inroster(user_id, jid) VALUES (?, ?) ON DUPLICATE KEY UPDATE user_id=user_id", uid, jid) > 0; } @Transactional -- cgit v1.2.3