From 23e953d9cfa082eb83098d096bf4b278312ce9d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 10 Sep 2020 15:49:34 +0200 Subject: [PATCH] crypto: Hide some methods that shouldn't be public. --- matrix_sdk_crypto/src/olm/group_sessions/inbound.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/matrix_sdk_crypto/src/olm/group_sessions/inbound.rs b/matrix_sdk_crypto/src/olm/group_sessions/inbound.rs index c0a295f5..a35c6190 100644 --- a/matrix_sdk_crypto/src/olm/group_sessions/inbound.rs +++ b/matrix_sdk_crypto/src/olm/group_sessions/inbound.rs @@ -72,7 +72,7 @@ impl InboundGroupSession { /// /// * `session_key` - The private session key that is used to decrypt /// messages. - pub fn new( + pub(crate) fn new( sender_key: &str, signing_key: &str, room_id: &RoomId, @@ -189,6 +189,11 @@ impl InboundGroupSession { }) } + /// The room where this session is used in. + pub fn room_id(&self) -> &RoomId { + &self.room_id + } + /// Returns the unique identifier for this session. pub fn session_id(&self) -> &str { &self.session_id @@ -207,7 +212,7 @@ impl InboundGroupSession { /// # Arguments /// /// * `message` - The message that should be decrypted. - pub async fn decrypt_helper( + pub(crate) async fn decrypt_helper( &self, message: String, ) -> Result<(String, u32), OlmGroupSessionError> { @@ -219,7 +224,7 @@ impl InboundGroupSession { /// # Arguments /// /// * `event` - The event that should be decrypted. - pub async fn decrypt( + pub(crate) async fn decrypt( &self, event: &SyncMessageEvent, ) -> MegolmResult<(Raw, u32)> {