updateFriends
Feature Introduction
Description
Modify friend information, including pinning, notes, and ex fields.
Note
Related Callback:
onFriendInfoChanged
onConversationChanged
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron/MiniProgram
- React-Native
- Unity
### Function Prototype
Future updateFriends(
UpdateFriendsReq req, {
String? operationID,
})
Input Parameters
Parameter Name | Parameter Type | Required | Description |
---|---|---|---|
updateFriendsReq | UpdateFriendsReq | YES | Changed structure |
Return Result
Parameter Name | Parameter Type | Description |
---|---|---|
~ | ~ | If no exception is thrown, the operation is successful |
Code Example
await OpenIM.iMManager.conversationManager.updateFriends(req);
//todo
Function Prototype
- (void)updateFriends:(OIMUpdateFriendsReq *)req
onSuccess:(nullable OIMSuccessCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;
Input Parameters
Parameter Name | Parameter Type | Required | Description |
---|---|---|---|
req | UpdateFriendsReq | YES | Changed structure |
Return Result
Parameter Name | Parameter Type | Description |
---|---|---|
onSuccess | OIMSuccessCallback | Success return |
onFailure | OIMFailureCallback | Failure return |
Code Example
[OIMManager.manager updateFriends:req
onSuccess:^(NSString * _Nullable data) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];
public void updateFriendsReq(OnBase<String> base, UpdateFriendsReq updateFriendsReq)
Input Parameters
Parameter Name | Parameter Type | Required | Description |
---|---|---|---|
updateFriendsReq | UpdateFriendsReq | Yes | friend info |
Return Result
Code Example
OpenIMClient.getInstance().friendshipManager.updateFriendsReq(new OnBase<String>() {
@Override
public void onError(int code, String error) {
// todo: request error
}
@Override
public void onSuccess(String data) {
// todo: request success
}
}, updateFriendsReq);
Description
To be updated.
Description
To be updated.
Description
To be updated.
public static void UpdateFriends(OnBase<bool> cb, UpdateFriendsReq req);
输入参数
Parameter Name | Parameter Type | Required | Description |
---|---|---|---|
cb | OnBase | Yes | Callback |
updateFriendsReq | UpdateFriendsReq | Yes | Changed structure |
返回结果
代码示例
IMSDK.UpdateFriends((suc,errCode,errMsg)=>{
}
, updateFriendsReq);