resetConversationGroupAtType
Feature Introduction
Description
Reset the @ flag to its default value.
Note
When someone in the group chat uses the @ mention, or when the group owner sends a group announcement, the groupAtType
in the conversation is triggered to the corresponding type.
After the user clicks on the conversation, calling this interface will reset the groupAtType
in the conversation to its default value 0.
Related Callback:
onConversationChanged
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron/MiniProgram
- React-Native
- Unity
Function Prototype
Future<dynamic> resetConversationGroupAtType({
required String conversationID,
String? operationID,
})
Input Parameters
Parameter Name | Data Type | Mandatory | Description |
---|---|---|---|
conversationID | String | Yes | Conversation ID |
Return Result
Name | Type | Description |
---|---|---|
~ | ~ | Successful if no exception thrown |
Code Example
await OpenIM.iMManager.conversationManager.resetConversationGroupAtType(conversationID: conversationID);
//todo
Function Prototype
- (void)resetConversationGroupAtType:(NSString *)conversationID
onSuccess:(nullable OIMSuccessCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;
Input Parameters
Parameter Name | Data Type | Mandatory | Description |
---|---|---|---|
conversationID | NSString | Yes | Conversation ID |
Return Result
Name | Type | Description |
---|---|---|
onSuccess | OIMSuccessCallback | Success return |
onFailure | OIMFailureCallback | Failure return |
Code Example
[OIMManager.manager resetConversationGroupAtType:@""
onSuccess:^(NSString * _Nullable data) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];
Function Prototype
public void resetConversationGroupAtType(OnBase<String> base, String conversationID)
Input Parameters
Parameter Name | Data Type | Mandatory | Description |
---|---|---|---|
callBack | OnBase<String> | Yes | Callback interface |
conversationID | String | Yes | Conversation ID |
Code Example
OpenIMClient.getInstance().conversationManager.resetConversationGroupAtType(new OnBase<String>() {
@Override
public void onError(int code, String error) {
}
@Override
public void onSuccess(String data) {
}
},conversationID);
Function Prototype
IMSDK.resetConversationGroupAtType(conversationID: string,operationID?: string): Promise<WsResponse>
Input Parameters
Parameter Name | Data Type | Mandatory | Description |
---|---|---|---|
conversationID | string | Yes | Conversation ID |
Return Result
Parameter Name | Data Type | Description |
---|---|---|
Promise.then() | Promise<WsResponse> | Success callback |
Promise.catch() | Promise<WsResponse> | Failure callback |
Code Example
import { getSDK } from 'open-im-sdk-wasm';
const IMSDK = getSDK();
// use in electron with ffi
// import { getWithRenderProcess } from '@openim/electron-client-sdk/lib/render';
// const { instance: IMSDK } = getWithRenderProcess();
// use in mini program
// import { OpenIMSDK } from 'open-im-sdk';
// const IMSDK = new OpenIMSDK();
IMSDK.resetConversationGroupAtType('conversationID')
.then(({ data }) => {
// Successful call
})
.catch(({ errCode, errMsg }) => {
// Failed call
});
Function Prototype
IMSDK.asyncApi('resetConversationGroupAtType', operationID: string, conversationID: string): Promise<void>
Input Parameters
Parameter Name | Data Type | Mandatory | Description |
---|---|---|---|
operationID | string | Yes | Operation ID, suggested to use current timestamp combined with a random number |
conversationID | string | Yes | Conversation ID |
Return Result
The function is Promise-based using the
openim-uniapp-polyfill
package. Usethen
andcatch
to determine and handle success or failure callbacks.
Parameter Name | Data Type | Description |
---|---|---|
Promise.then() | Promise<void> | Success callback |
Promise.catch() | Promise<CatchResponse> | Failure callback |
Code Example
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.asyncApi('resetConversationGroupAtType',
IMSDK.uuid(), 'conversationID')
.then(() => {
// Successful call
})
.catch(({ errCode, errMsg }) => {
// Failed call
});
Function Prototype
OpenIMSDKRN.resetConversationGroupAtType(conversationID: string, operationID: string): Promise<void>
Input Parameters
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
conversationID | string | Yes | Conversation ID |
operationID | string | Yes | Operation ID, used for problem location, keep unique, suggest using current time and random number |
Return Result
Parameter Name | Parameter Type | Description |
---|---|---|
Promise.then() | Promise<void> | Callback on successful call |
Promise.catch() | Promise<CatchResponse> | Callback on failed call |
Code Example
import OpenIMSDKRN from "open-im-sdk-rn";
OpenIMSDKRN.resetConversationGroupAtType('conversationID', 'operationID')
.then(() => {
// Successful call
})
.catch(({ errCode, errMsg }) => {
// Failed call
});
Function Prototype
public static void ResetConversationGroupAtType(OnSucOrError cb, string conversationID)
Input Parameter
Parameter Name | Parameter Type | Mandatory | Description |
---|---|---|---|
cb | OnSucOrError | Yes | Callback |
conversationID | string | Yes | Conversation ID |
Code Example
IMSDK.ResetConversationGroupAtType((suc,errCode,errMsg)=>{
},conversationID);