setC2CReceiveMessageOpt method
Implementation
Future<V2TimCallback> setC2CReceiveMessageOpt({
required List<String> userIDList,
required int opt,
}) async {
try {
final remindTypeOpt = {'userIDList': userIDList, 'messageRemindType': GroupRecvMsgOpt.convertMsgRecvOptToWeb(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);
}
}