Android中的QuickBlox附件问题

时间:2016-07-29 09:35:36

标签: android quickblox

在群聊中我附加单个文件,而发送QBMessage对象有1个附件,但在接收到QBMessage对象时,相同的附件会出现两次。

这仅在群聊中发生。在私人聊天中它可以正常工作

1 个答案:

答案 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) {
        }
    }
}