2017-08-02 55 views
1

我想在this文件啪MamManager拋出異常而獲取存檔的消息

try { 
      MamManager mamManager = MamManager.getInstanceFor(connection); 
      boolean isSupported = mamManager.isSupportedByServer(); 
      if (isSupported) { 
       MamManager.MamQueryResult mamQueryResult = mamManager.queryArchive(500); 
       List<Forwarded> forwardedMessages = mamQueryResult.forwardedMessages; 
       Forwarded d = forwardedMessages.get(0); 
      } 
     } catch (Exception e) { 
      e.printStackTrace(); 
     } 

描述得到使用下面的代碼存檔的消息,但它扔上執行queryArchive()功能org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: feature-not-implemented - cancel例外。有沒有人有任何想法如何解決這個問題?任何幫助,將不勝感激。

回答

0

將openfire服務器更新到最新版本(4.1.5)後現在解決此問題