From d0ca065097636c2e3313582849b0a88ad9b1bf16 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 6 Feb 2017 17:07:41 +0300 Subject: juick-xmpp: broadcast bot presence --- juick-server/src/main/java/com/juick/service/UserService.java | 2 ++ juick-server/src/main/java/com/juick/service/UserServiceImpl.java | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'juick-server') diff --git a/juick-server/src/main/java/com/juick/service/UserService.java b/juick-server/src/main/java/com/juick/service/UserService.java index 166cfeeb..661f386c 100644 --- a/juick-server/src/main/java/com/juick/service/UserService.java +++ b/juick-server/src/main/java/com/juick/service/UserService.java @@ -121,4 +121,6 @@ public interface UserService { boolean deleteJID(int uid, String jid); boolean unauthJID(int uid, String jid); + + List getAllJIDs(); } diff --git a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java index b1339049..81a1fea7 100644 --- a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java @@ -693,4 +693,10 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { return getJdbcTemplate() .update("DELETE FROM auth WHERE user_id=? AND protocol='xmpp' AND account=?", uid, jid) > 0; } + + @Transactional(readOnly = true) + @Override + public List getAllJIDs() { + return getJdbcTemplate().queryForList("SELECT jid FROM jids WHERE loginhash IS NULL", String.class); + } } -- cgit v1.2.3