setGroupReceiveMessageOpt method
Implementation
Future<V2TimCallback> setGroupReceiveMessageOpt(params) async {
try {
final remindTypeOpt = {'groupID': params['groupID'], 'messageRemindType': GroupRecvMsgOpt.convertMsgRecvOptToWeb(params['opt'])};
final res = await wrappedPromiseToFuture(timeweb!.setMessageRemindType(mapToJSObj(remindTypeOpt)));
if (res.code == 0) {
return CommonUtils.returnSuccessForCb(jsToMap(res.data));
} else {
return CommonUtils.returnError('set group recv msg opt failed');
}
} catch (error) {
return CommonUtils.returnError(error);
}
}