setConversation
Feature Introduction
Description
Set session information.
Note
Related Callback: onConversationChanged
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron/MiniProgram
- React-Native
- Unity
### Function Prototype
Future setConversation(
String conversationID,
ConversationReq req, {
String? operationID,
})
Input Parameters
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
conversationID | NSString | YES | Conversation ID |
req | ConversationReq | YES | Changed structure |
Return Value
Name | Type | Description |
---|---|---|
~ | ~ | If no exception is thrown, the operation is successful |
Code Example
await OpenIM.iMManager.conversationManager.setConversation(conversationID, req);
//todo
Function Prototype
- (void)setConversation:(NSString *)conversationID
req:(OIMConversationReq *)req
onSuccess:(nullable OIMSuccessCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;
Input Parameters
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
conversationID | NSString | YES | Conversation ID |
req | OIMConversationReq | YES | Changed structure |
Return Value
Name | Type | Description |
---|---|---|
onSuccess | OIMSuccessCallback | Success return |
onFailure | OIMFailureCallback | Failure return |
Code Example
[OIMManager.manager setConversation:@""
req: req
onSuccess:^(NSString * _Nullable data) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];
Function Prototype
public void setConversation(OnBase<String> base, String conversationID, ConversationReq conversationReq)
Input Parameters
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
conversationID | String | Yes | conversation ID |
conversationReq | ConversationReq | Yes | conversation request info |
Return Value
Code Example
OpenIMClient.getInstance().conversationManager.setConversation(new OnBase<String>() {
@Override
public void onError(int code, String error) {
// todo: request error
}
@Override
public void onSuccess(String data) {
// todo: request success
}
}, conversationID , conversationReq);
Description
To be updated.
Description
To be updated.
Description
To be updated.
Function Prototype
public static void SetConversation(OnBase<bool> cb, string conversationId, ConversationReq req)
Input Parameters
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
conversationId | string | Yes | conversation ID |
conversationReq | ConversationReq | Yes | Changed structure |
Return Value
Code Example
IMSDK.SetConversation((suc,errCode,errMsg)=> {
}, conversationId , conversationReq);