onNewConversation
Feature Introduction
info
When a new conversation is initiated, this callback is received.
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron/MiniProgram
- Unity
Return Prototype
Function(List<ConversationInfo> list)? onNewConversation;
Return Result
Name | Type | Description |
---|---|---|
list | List<ConversationInfo> | Conversation details |
Return Prototype
- (void)onNewConversation:(NSArray <OIMConversationInfo *> *)conversations;
Return Result
Name | Type | Description |
---|---|---|
conversations | NSArray < OIMConversationInfo * > | Conversation details |
Return Prototype
void onNewConversation(List<ConversationInfo> list)
Return Result
Name | Type | Description |
---|---|---|
list | List<ConversationInfo> | Conversation details |
Return Prototype
onNewConversation(data: WSEvent<ConversationItem[]>): void;
Return Result
Name | Type | Description |
---|---|---|
data | WSEvent<ConversationItem[]> | Conversation details |
Example Call
import { getSDK, CbEvents } from '@openim/wasm-client-sdk';
// or
// import { getSDK, CbEvents } from '@openim/client-sdk';
// const IMSDK = getSDK();
const IMSDK = getSDK();
IMSDK.on(
CbEvents.OnNewConversation,
({ data }: WSEvent<ConversationItem[]>) => {
// data Conversation details
}
);
Return Prototype
onNewConversation(data: WSEvent<ConversationItem[]>): void;
Return Result
Name | Type | Description |
---|---|---|
data | WSEvent<ConversationItem[]> | Conversation details |
Example Call
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.subscribe(
IMSDK.IMEvents.OnNewConversation,
({ data }: WSEvent<ConversationItem[]>) => {
// data Conversation details
}
);
Prototype
void OnNewConversation(List<Conversation> list);
Parameter
Parameter Name | Type | Description |
---|---|---|
list | List<Conversation> | Conversation List |