这就是我正在做的事情: - 登录后尝试加入群组。
connection.login(userDate.getUserId(),userDate.getUserPassword());
登录****后****
String groupName =
XmppUtils.buildMUCName(results.get(i).getGroupName().trim());
MultiUserChat multiUserChat = managerMuc.getMultiUserChat(groupName);
try {
if (!multiUserChat.isJoined()) {
multiUserChat.join(userId);
} } catch (SmackException.NoResponseException e) {
e.printStackTrace();
} catch (XMPPException.XMPPErrorException e) {
e.printStackTrace();
} catch (SmackException.NotConnectedException e) {
e.printStackTrace();
} catch (SmackException e) {
e.printStackTrace();
}
答案 0 :(得分:1)
var collection = db.collection('mycollection')
collection.find({name: 'modulus user', roles: 'user'}).toArray(...