request3pidManagementTokenViaEmail method

Future<ThreePidEmailTokenResponse> request3pidManagementTokenViaEmail(
  1. String emailAddress
)

Requests token via email and add email address to third party identifier. If password is not enough complex, homeserver may reject this request.

Implementation

Future<ThreePidEmailTokenResponse> request3pidManagementTokenViaEmail(
  String emailAddress,
) {
  final tmp1 = emailAddress;
  var tmp0 = 0;
  var tmp2 = 0;
  var tmp3 = 0;
  var tmp4 = 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 = _api._accountRequest3pidManagementTokenViaEmail(
    tmp0,
    tmp2,
    tmp3,
    tmp4,
  );
  final tmp7 = tmp5;
  final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
  final tmp7_1 = _Box(_api, tmp7_0,
      "__Account_request_3pid_management_token_via_email_future_drop");
  tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
  final tmp6 = _nativeFuture(
      tmp7_1, _api.__accountRequest3pidManagementTokenViaEmailFuturePoll);
  return tmp6;
}