コード例 #1
0
 public void joinRoomChat(QBDialog dialog)
     throws XMPPException, SmackException, QBResponseException {
   QBGroupChat roomChat = createChatIfNotExist(dialog);
   if (!roomChat.isJoined()) {
     DiscussionHistory history = new DiscussionHistory();
     history.setMaxStanzas(0);
     roomChat.join(history);
   }
 }
コード例 #2
0
 public void leaveDialogs() throws XMPPException, SmackException.NotConnectedException {
   if (groupDialogsList != null) {
     for (QBDialog dialog : groupDialogsList) {
       QBGroupChat roomChat = groupChatManager.getGroupChat(dialog.getRoomJid());
       if (roomChat != null && roomChat.isJoined()) {
         roomChat.leave();
       }
     }
   }
 }