Bug when retrieving IMMessage Jid on Android Rainbow Messaging SDK
-
Comentário oficial
Hi, sorry for the time to answer !
When you chat (sent and recieve IMMessage directly), messages sent by you have your Jid and messages recieves from the other contact have the Jid of the contact. When you retrieve IMMessage of a conversation from history (mam), all IMMessage have the Jid of the contact associated with the Conversation.
You can retrieve if the IMMessage is from you with "imMessage.isMsgSent()"
Maybe in the future we will update this behavior to always have the right Jid.
Ações de comentário -
Hello, I had the same problem and I was able to solve it in android using the method "imMessage.isMsgSent()", however I am also doing the same development on iOS and I have encountered the same problem, but in this case the "message" object does not have a "isMsgSent method.
How could I fix it with the iOS SDK?
-
Hi @Juan Antonio Garcia,
On Android I have found a way to know if the message is from the account you are currently connected with, or from the other person you talk with in the conversation.
When you retrieve the array of IMMessage, each IMMessage has a deliveryState "immessage.deliveryState" :public static enum DeliveryState {
// message from the account you are currently connected with
SENT,
TO_RESENT,
SENT_SERVER_RECEIVED,
SENT_CLIENT_RECEIVED,
SENT_CLIENT_READ,// message from the other person you talk with in the conversation
RECEIVED,
READ,
// unknown
UNKNOWN;
}
Por favor, entrar para comentar.
Comentários
3 comentários