Top

Bug when retrieving IMMessage Jid on Android Rainbow Messaging SDK

Comentários

3 comentários

  • Comentário oficial
    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.

    Ações de comentário 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
    Ações de comentário 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
    Ações de comentário Permalink

Por favor, entrar para comentar.

Ainda não consegue encontrar o que você precisa?

  • Contate-nos

    Você tem alguma pergunta sobre o Rainbow? Deixe-nos uma mensagem para obter mais informações.

    Contato
  • Pergunte à Comunidade

    Você precisa de ajuda? Faça suas perguntas na Comunidade para obter respostas de outros usuários do Rainbow.

    Enviar mensagem