fetchConversationSilentMode method
- required String conversationId,
- required ChatConversationType type,
获取指定会话的离线推送设置。
Param conversationId
会话 ID。
Param type
会话类型。
Return 会话的离线推送设置。
Throws 如果有异常会在此抛出,包括错误码和错误信息,详见 ChatError。
Implementation
Future<ChatSilentModeResult> fetchConversationSilentMode({
required String conversationId,
required ChatConversationType type,
}) async {
Map req = {};
req["conversationId"] = conversationId;
req["conversationType"] = type.index;
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;
}
}