- Android
- iOS
- JavaScript
- Flutter
- ReactNative
- HarmonyOS
Set Mute Notifications for a conversation. The setting is synchronized across clients. Mobile clients no longer receive offline pushes after it is set, and the SDK automatically updates the (conversation) mute property after a successful call.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 1.0.0 |
| isMute | boolean | YES enables Mute Notifications; NO disables it. | 1.0.0 |
| callback | ISimpleCallback | Result callback | 1.0.0 |
Code Example
Conversation conversation = new Conversation(Conversation.ConversationType.PRIVATE, "userId1");
JIM.getInstance().getConversationManager().setMute(conversation, true, new IConversationManager.ISimpleCallback() {
@Override
public void onSuccess() {
}
@Override
public void onError(int errorCode) {
}
});
Set Mute Notifications for a conversation. The setting is synchronized across clients. Mobile clients no longer receive offline pushes after it is set, and the SDK automatically updates the (conversation) mute property after a successful call.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| isMute | BOOL | YES enables Mute Notifications; NO disables it. | 1.0.0 |
| conversation | JConversation | Conversation identifier | 1.0.0 |
| successBlock | Success callback | 1.0.0 | |
| errorBlock | Failure callback | 1.0.0 |
Code Example
JConversation *conversation = [[JConversation alloc] initWithConversationType:JConversationTypePrivate conversationId:@"userId1"];
[JIM.shared.conversationManager setMute:YES
conversation:conversation
success:^{
} error:^(JErrorCode code) {
}];
Set Mute Notifications for a conversation. The setting is synchronized across clients. Mobile clients no longer receive offline pushes after it is set, and the SDK automatically updates the (conversation) undisturbType property after a successful call.
Parameters
| Name | Type | Required | Default | Description | Version |
|---|---|---|---|---|---|
| conversation | Object | Yes | None | Conversation object | 1.0.0 |
| conversation.conversationType | Number | Yes | None | Conversation type | 1.0.0 |
| conversation.conversationId | String | Yes | None | Conversation ID | 1.0.0 |
| conversation.undisturbType | Number | Yes | None | Mute Notifications type | 1.0.0 |
Code Example
let { ConversationType, UndisturbType } = JIM;
let conversation = {
conversationType: ConversationType.PRIVATE,
conversationId: 'userId01',
undisturbType: UndisturbType.UNDISTURB,
};
jim.disturbConversation(conversation).then(() => {
console.log('set conversation disturb successfully');
});
Set Mute Notifications for a conversation. The setting is synchronized across clients. Mobile clients no longer receive offline pushes after it is set, and the SDK automatically updates the (conversation) undisturbType property after a successful call.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 1.0.0 |
| isMute | boolean | YES enables Mute Notifications; NO disables it. | 1.0.0 |
| callback | CommonCallback | Result callback | 1.0.0 |
Code Example
let conver = new Conversation("userid1",1)
JuggleIm.instance.getConversationManager().setMute(conver,true,(code)=>{
})
Set Mute Notifications for a conversation. The setting is synchronized to the current user's other devices. Mobile clients no longer receive offline push notifications after it is enabled, and the SDK automatically updates the conversation's mute property after a successful call.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 0.6.3 |
| isMute | bool | true enables Mute Notifications; false disables it. | 0.6.3 |
Code Example
Conversation conversation = Conversation(ConversationType.private, 'userId1');
Result result = await JuggleIm.instance.setMute(conversation, true);
Set Mute Notifications for a conversation. The setting is synchronized across clients. Mobile clients no longer receive offline pushes after it is set, and the SDK automatically updates the (conversation) mute property after a successful call.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | Object | Conversation identifier | 0.6.3 |
| conversationType | Number | Conversation type | 0.6.3 |
| conversationId | String | Conversation ID | 0.6.3 |
| isMute | Boolean | true enables Mute Notifications; false disables it. | 0.6.3 |
Code Example
import JuggleIM from 'juggleim-rnsdk';
await JuggleIM.setMute({
conversationType: 1,
conversationId: 'userId1',
isMute: true
});