fetchConversationSilentMode method
- {required String conversationId,
- required ChatConversationType type}
Gets the offline push settings of a conversation.
Param conversationId
The conversation ID.
Param type
The conversation type.
Return The offline push settings of the conversation.
Throws A description of the exception. See ChatError.
Implementation
Future<ChatSilentModeResult> fetchConversationSilentMode({
required String conversationId,
required ChatConversationType type,
}) async {
Map req = {};
req["conversationId"] = conversationId;
req["conversationType"] = conversationTypeToInt(type);
Map result = await PushChannel.invokeMethod(
ChatMethodKeys.fetchConversationSilentMode, req);
try {
ChatError.hasErrorFromResult(result);
Map map = result[ChatMethodKeys.fetchConversationSilentMode];
return ChatSilentModeResult.fromJson(map);
} on ChatError catch (e) {
throw e;
}
}