Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

199
Visualizações
How to check if I've read all messages of a particular user in Mesibo - Javascript?

Is there a way to get the number of total messages of a particular read session using the Javascript SDK? We're syncing and reading the messages but the read method always returns true so we are not able to check wether we reached the end of our messages list.

This is a code snippet we're using:

async syncApp(user: string, readCount: number) {
    const on_read = (count: any) => {
        let msgs = mReadSession.getMessages();
    };

    let mReadSession = await this.mesibo.getInstance().readDbSession(user, 0, null, on_read)

// `res` is always true
    let res = await mReadSession.read(readCount);


    if (res < readCount) {
        mReadSession.sync(readCount - res, on_read)
    }

    return mReadSession;
}

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda