• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

118
Views
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 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error