setC2CReceiveMessageOpt method
Implementation
Future<V2TimCallback> setC2CReceiveMessageOpt({
required List<String> userIDList,
required ReceiveMsgOptEnum opt,
}) async {
if (!TIMManager.instance.isInitSDK()) {
return V2TimCallback(code: TIMErrCode.ERR_SDK_NOT_INITIALIZED.value, desc: "sdk not init");
}
String userData = Tools.generateUserData('setC2CReceiveMessageOpt');
Completer<V2TimCallback> completer = Completer();
NativeLibraryManager.timCallback2Future(userData, completer);
Pointer<Char> pUserIDList = Tools.string2PointerChar(json.encode(userIDList));
TIMReceiveMessageOpt messageOpt = TIMReceiveMessageOpt.fromValue(opt.index);
Pointer<Void> pUserData = Tools.string2PointerVoid(userData);
NativeLibraryManager.bindings.DartSetC2CReceiveMessageOpt(pUserIDList, messageOpt, pUserData);
return completer.future;
}