在群聊中我附加单个文件,而发送QBMessage对象有1个附件,但在接收到QBMessage对象时,相同的附件会出现两次。
这仅在群聊中发生。在私人聊天中它可以正常工作
答案 0 :(得分:0)
好像您使用此处的示例作为应用程序的起点:https://github.com/QuickBlox/quickblox-android-sdk 我有同样的错误,所以我的快速解决方案是覆盖GroupChatImpl.java
中的sendMessage方法@Override
public void sendMessage(QBChatMessage message) throws XMPPException, SmackException.NotConnectedException {
if (qbChat != null) {
try {
qbChat.sendMessageWithoutJoin(message);
} catch (SmackException.NotConnectedException | IllegalStateException e) {
}
}
}