From 4fa58bfaac2d512b2287fd62800c45006258c0e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 22 Jul 2020 13:40:47 +0200 Subject: [PATCH] crypto: Add getters for the user and device id in the account. --- matrix_sdk_crypto/src/olm/account.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/matrix_sdk_crypto/src/olm/account.rs b/matrix_sdk_crypto/src/olm/account.rs index a1308666..abd4d5f6 100644 --- a/matrix_sdk_crypto/src/olm/account.rs +++ b/matrix_sdk_crypto/src/olm/account.rs @@ -93,6 +93,16 @@ impl Account { } } + /// Get the user id of the owner of the account. + pub fn user_id(&self) -> &UserId { + &self.user_id + } + + /// Get the device id that owns this account. + pub fn device_id(&self) -> &DeviceId { + &self.device_id + } + /// Get the public parts of the identity keys for the account. pub fn identity_keys(&self) -> &IdentityKeys { &self.identity_keys