我正在尝试使用this文档
中所述的以下代码获取存档消息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();
}
但它正在执行org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: feature-not-implemented - cancel
函数时抛出queryArchive()
异常。有谁知道如何解决这个问题?任何帮助将不胜感激。
答案 0 :(得分:0)
将openfire服务器更新到最新版本(4.1.5)后,此问题现已解决