diff options
author | Vitaly Takmazov | 2017-02-06 17:07:41 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-02-06 17:41:03 +0300 |
commit | d0ca065097636c2e3313582849b0a88ad9b1bf16 (patch) | |
tree | 12b9c1ec10d9a89ae4799dc8cb0d17842d53f41d /juick-server/src/main/java/com/juick | |
parent | 2befd7c98f9932d1aab6d72477490d0224000d62 (diff) |
juick-xmpp: broadcast bot presence
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-rw-r--r-- | juick-server/src/main/java/com/juick/service/UserService.java | 2 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/service/UserServiceImpl.java | 6 |
2 files changed, 8 insertions, 0 deletions
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<String> 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<String> getAllJIDs() { + return getJdbcTemplate().queryForList("SELECT jid FROM jids WHERE loginhash IS NULL", String.class); + } } |