Skip to content

Message seen status

Saša Lončarević edited this page Oct 17, 2024 · 3 revisions

Mobile Messaging SDK has an API to mark messages as seen by user. This is usually done when user opens a particular message. Message can be obtained via messageReceived event.

var message = ...;

mobileMessaging.markMessagesSeen(
    [message.messageId],
    messageIds => {
        console.log('Message ids marked as seen', messageIds);
    },
    error => {
        console.log(JSON.stringify(error));
    }
);

Note that corresponding SDK function accepts array of message IDs as input parameter. You can also set success and error callbacks. Success callback will provide array of message IDs that were marked as seen. Error callback will notify about an error and provide description of error if any.

Clone this wiki locally