QBChatMessage.isMarkable () always returns false even after the default is set to true before sending the message
I am working on an Android app with the QuickBlox SDK. When implementing Private Chat, I set the post's markable property to true by calling message.setMarkable(true)
on the object QBChatMessage
before posting the message.
Following is the override function processMessage
. Here the incoming QBChatMessage message
always has the property markable
as false
. As such, it does not allow a message to be "read" by a function privateChat.readMessage()
.
@Override
public void processMessage(QBPrivateChat chat, QBChatMessage message) {
Log.w(TAG, "new incoming message: " + message);
message.setMarkable(true);
chatActivity.showMessage(message);
if (message.isMarkable()) {
try {
privateChat.readMessage(message.getId());
} catch (XMPPException e) {
} catch (SmackException.NotConnectedException e) {
}
}
}
Let me know what might be wrong here.
Thanks in advance.
source to share