onFriendApplicationAdded
Feature Introduction
info
After a user initiates a friend request, both the requester and the recipient will receive this callback. The recipient can choose to accept or decline the friend request.
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron/MiniProgram
- Unity
Return Prototype
Function(FriendApplicationInfo application)? onFriendApplicationAdded;
Return Results
Name | Type | Description |
---|---|---|
application | FriendApplicationInfo | Friend Application |
Return Prototype
- (void)onFriendApplicationAdded:(OIMFriendApplication *)application;
Return Results
Name | Type | Description |
---|---|---|
application | OIMFriendApplication | Friend Application |
Return Prototype
void onFriendApplicationAdded(FriendApplicationInfo application);
Return Results
Name | Type | Description |
---|---|---|
application | FriendApplicationInfo | New Friend Application |
Return Prototype
onFriendApplicationAdded(data: WSEvent<FriendApplicationItem>): void;
Return Results
Name | Type | Description |
---|---|---|
data | WSEvent<FriendApplicationItem> | Friend Application |
Call Example
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.OnFriendApplicationAdded, ({ data }) => {
// data - Friend Application
});
Return Prototype
onFriendApplicationAdded(data: WSEvent<FriendApplicationItem>): void;
Return Results
Name | Type | Description |
---|---|---|
data | WSEvent<FriendApplicationItem> | Friend Application |
Call Example
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.subscribe(IMSDK.IMEvents.OnFriendApplicationAdded, ({ data }) => {
// data - Friend Application
});
Prototype
void OnFriendApplicationAdded(FriendApplicationInfo application);
Parameter
Parameter Name | Type | Description |
---|---|---|
application | FriendApplicationInfo | Friend Application |