acceptEncryption method

Future<Result<EncryptedChatBase>> acceptEncryption({
  1. required InputEncryptedChatBase peer,
  2. required Uint8List gB,
  3. required int keyFingerprint,
})

Accept Encryption.

ID: 3dbc0415.

Implementation

Future<Result<EncryptedChatBase>> acceptEncryption({
  required InputEncryptedChatBase peer,
  required Uint8List gB,
  required int keyFingerprint,
}) async {
  // Preparing the request.
  final request = MessagesAcceptEncryption(
    peer: peer,
    gB: gB,
    keyFingerprint: keyFingerprint,
  );

  // Invoke and wait for response.
  final response = await _c.invoke(request);

  // Return the result.
  return response._to<EncryptedChatBase>();
}