From 5f844dafda63a6abbb2f872308ec506e28c51324 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Tue, 27 Dec 2022 01:45:24 +0100 Subject: [PATCH] feat: Add getDeviceId --- lib/src/omemo/omemomanager.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/omemo/omemomanager.dart b/lib/src/omemo/omemomanager.dart index c55eb01..788977a 100644 --- a/lib/src/omemo/omemomanager.dart +++ b/lib/src/omemo/omemomanager.dart @@ -655,6 +655,9 @@ class OmemoManager { /// Returns the device used for encryption and decryption. Future getDevice() => _deviceLock.synchronized(() => _device); + /// Returns the id of the device used for encryption and decryption. + Future getDeviceId() => (await getDevice()).id; + /// Returns the fingerprints for all devices of [jid] that we have a session with. /// If there are not sessions with [jid], then returns null. Future?> getFingerprintsForJid(String jid) async {