setC2CReceiveMessageOpt static method
Future<V2TimCallback>
setC2CReceiveMessageOpt(
{ - required List<String> userIDList,
- required int opt,
})
Implementation
static Future<V2TimCallback> setC2CReceiveMessageOpt({
required List<String> userIDList,
required int opt,
}) async {
String userData = Tools.generateUserData();
Pointer<Uint8> user_data = Tools.string2PointerInt8(userData);
Pointer<Uint8> json_identifier_array = Tools.string2PointerInt8(json.encode(userIDList));
int res = desktopSDK.D_TIMMsgSetC2CReceiveMessageOpt(json_identifier_array, opt, user_data);
if (res != TIMResult.TIM_SUCC) {
return V2TimCallback.fromJson({
"code": res,
"desc": "",
});
} else {
Map<String, dynamic> revoke = await getAsyncData(apiKey: userData);
return V2TimCallback.fromJson({
"code": revoke["code"],
"desc": revoke["desc"],
});
}
}