feat: Add getDeviceId

This commit is contained in:
PapaTutuWawa 2022-12-27 01:45:24 +01:00
parent 480de1ce8f
commit 5f844dafda

View File

@ -655,6 +655,9 @@ class OmemoManager {
/// Returns the device used for encryption and decryption.
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.
/// If there are not sessions with [jid], then returns null.
Future<List<DeviceFingerprint>?> getFingerprintsForJid(String jid) async {