feat: Add getDeviceId

This commit is contained in:
PapaTutuWawa committed 2022-12-27 12:43:50 +01:00
1 parent 480de1ce8f
commit 5f844dafda
1 file changed
+3
+3
View File
@@ -655,6 +655,9 @@ class OmemoManager {
/// Returns the device used for encryption and decryption. /// Returns the device used for encryption and decryption.
Future<Device> getDevice() => _deviceLock.synchronized(() => _device); Future<Device> getDevice() => _deviceLock.synchronized(() => _device);
/// Returns the id of the device used for encryption and decryption.
Future<int> getDeviceId() => (await getDevice()).id;
/// Returns the fingerprints for all devices of [jid] that we have a session with. /// Returns the fingerprints for all devices of [jid] that we have a session with.
/// If there are not sessions with [jid], then returns null. /// If there are not sessions with [jid], then returns null.
Future<List<DeviceFingerprint>?> getFingerprintsForJid(String jid) async { Future<List<DeviceFingerprint>?> getFingerprintsForJid(String jid) async {