Top

Bug when retrieving IMMessage Jid on Android Rainbow Messaging SDK

Kommentare

3 Kommentare

  • Offizieller Kommentar
    Jérôme Gully

    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.

    Aktionen für Kommentare Permalink
  • Juan Antonio Garcia

    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?

    0
    Aktionen für Kommentare Permalink
  • Vincent CHANN

    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;
    }
    0
    Aktionen für Kommentare Permalink

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

  • Fragen Sie die Gemeinschaft

    Brauchen Sie Hilfe? Stellen Sie Ihre Fragen in der Community, um Antworten von anderen Rainbow-Benutzern zu erhalten.

    Nachricht posten