decryptToDeviceEvent method

Future<ToDeviceEvent> decryptToDeviceEvent(
  1. ToDeviceEvent event
)

Implementation

Future<ToDeviceEvent> decryptToDeviceEvent(ToDeviceEvent event) async {
  try {
    return await olmManager.decryptToDeviceEvent(event);
  } catch (e, s) {
    Logs().w(
      '[LibOlm] Could not decrypt to device event from ${event.sender} with content: ${event.content}',
      e,
      s,
    );
    client.onEncryptionError.add(
      SdkError(
        exception: e is Exception ? e : Exception(e),
        stackTrace: s,
      ),
    );
    return event;
  }
}