aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src')
-rw-r--r--juick-server/src/main/java/com/juick/service/UserService.java2
-rw-r--r--juick-server/src/main/java/com/juick/service/UserServiceImpl.java6
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);
+ }
}