Skip to main content

onRecvOfflineNewMessages

Feature Introduction

info

When the application is running in the background and receives new messages, this callback is triggered. The callback might carry multiple messages.

Return Prototype


onRecvOfflineNewMessages(data: WSEvent<MessageItem[]>): void;

Return Result

NameTypeDescription
dataWSEvent<MessageItem[]>New Messages

Example Call

import IMSDK from 'openim-uniapp-polyfill';

IMSDK.subscribe(IMSDK.IMEvents.OnRecvOfflineNewMessages, ({ data }) => {
// data is the list of new offline messages
});