Smack MamManager 在获取归档消息时抛出异常
Smack MamManager throws exception while fetching archived messages
我正在尝试使用 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();
}
但是它在执行 queryArchive()
函数时抛出 org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: feature-not-implemented - cancel
异常。有谁知道如何解决这个问题?任何帮助将不胜感激。
将 openfire 服务器更新到最新版本 (4.1.5) 后,此问题现已解决
我正在尝试使用 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();
}
但是它在执行 queryArchive()
函数时抛出 org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: feature-not-implemented - cancel
异常。有谁知道如何解决这个问题?任何帮助将不胜感激。
将 openfire 服务器更新到最新版本 (4.1.5) 后,此问题现已解决