redactReaction method

Future<EventId> redactReaction(
  1. String senderId,
  2. String key,
  3. String? reason,
  4. String? txnId,
)

remove the reaction using symbol key

Implementation

Future<EventId> redactReaction(
  String senderId,
  String key,
  String? reason,
  String? txnId,
) {
  final tmp1 = senderId;
  final tmp5 = key;
  final tmp9 = reason;
  final tmp15 = txnId;
  var tmp0 = 0;
  var tmp2 = 0;
  var tmp3 = 0;
  var tmp4 = 0;
  var tmp6 = 0;
  var tmp7 = 0;
  var tmp8 = 0;
  var tmp10 = 0;
  var tmp12 = 0;
  var tmp13 = 0;
  var tmp14 = 0;
  var tmp16 = 0;
  var tmp18 = 0;
  var tmp19 = 0;
  var tmp20 = 0;
  tmp0 = _box.borrow();
  final tmp1_0 = utf8.encode(tmp1);
  tmp3 = tmp1_0.length;

  final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
  final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
  tmp2_1.setAll(0, tmp1_0);
  tmp2 = tmp2_0.address;
  tmp4 = tmp3;
  final tmp5_0 = utf8.encode(tmp5);
  tmp7 = tmp5_0.length;

  final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
  final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
  tmp6_1.setAll(0, tmp5_0);
  tmp6 = tmp6_0.address;
  tmp8 = tmp7;
  if (tmp9 == null) {
    tmp10 = 0;
  } else {
    tmp10 = 1;
    final tmp11 = tmp9;
    final tmp11_0 = utf8.encode(tmp11);
    tmp13 = tmp11_0.length;

    final ffi.Pointer<ffi.Uint8> tmp12_0 = _api.__allocate(tmp13 * 1, 1);
    final Uint8List tmp12_1 = tmp12_0.asTypedList(tmp13);
    tmp12_1.setAll(0, tmp11_0);
    tmp12 = tmp12_0.address;
    tmp14 = tmp13;
  }
  if (tmp15 == null) {
    tmp16 = 0;
  } else {
    tmp16 = 1;
    final tmp17 = tmp15;
    final tmp17_0 = utf8.encode(tmp17);
    tmp19 = tmp17_0.length;

    final ffi.Pointer<ffi.Uint8> tmp18_0 = _api.__allocate(tmp19 * 1, 1);
    final Uint8List tmp18_1 = tmp18_0.asTypedList(tmp19);
    tmp18_1.setAll(0, tmp17_0);
    tmp18 = tmp18_0.address;
    tmp20 = tmp19;
  }
  final tmp21 = _api._reactionManagerRedactReaction(
    tmp0,
    tmp2,
    tmp3,
    tmp4,
    tmp6,
    tmp7,
    tmp8,
    tmp10,
    tmp12,
    tmp13,
    tmp14,
    tmp16,
    tmp18,
    tmp19,
    tmp20,
  );
  final tmp23 = tmp21;
  final ffi.Pointer<ffi.Void> tmp23_0 = ffi.Pointer.fromAddress(tmp23);
  final tmp23_1 =
      _Box(_api, tmp23_0, "__ReactionManager_redact_reaction_future_drop");
  tmp23_1._finalizer = _api._registerFinalizer(tmp23_1);
  final tmp22 =
      _nativeFuture(tmp23_1, _api.__reactionManagerRedactReactionFuturePoll);
  return tmp22;
}