File tree 2 files changed +6
-8
lines changed
crates/matrix-sdk-crypto/src
session_manager/group_sessions
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ use std::{
21
21
} ,
22
22
} ;
23
23
24
- use matrix_sdk_common:: { deserialized_responses :: WithheldCode , locks:: RwLock } ;
24
+ use matrix_sdk_common:: locks:: RwLock ;
25
25
use ruma:: {
26
26
api:: client:: keys:: upload_signatures:: v3:: Request as SignatureUploadRequest ,
27
27
events:: { key:: verification:: VerificationMethod , AnyToDeviceEventContent } ,
@@ -64,9 +64,9 @@ pub enum MaybeEncryptedRoomKey {
64
64
share_info : ShareInfo ,
65
65
message : Raw < AnyToDeviceEventContent > ,
66
66
} ,
67
- Withheld {
68
- code : WithheldCode ,
69
- } ,
67
+ /// We could not encrypt a message to this device because there is no active
68
+ /// Olm session.
69
+ MissingSession ,
70
70
}
71
71
72
72
/// A read-only version of a `Device`.
@@ -841,9 +841,7 @@ impl DeviceData {
841
841
message : encrypted. cast ( ) ,
842
842
} ) ,
843
843
844
- Err ( OlmError :: MissingSession ) => {
845
- Ok ( MaybeEncryptedRoomKey :: Withheld { code : WithheldCode :: NoOlm } )
846
- }
844
+ Err ( OlmError :: MissingSession ) => Ok ( MaybeEncryptedRoomKey :: MissingSession ) ,
847
845
Err ( e) => Err ( e) ,
848
846
}
849
847
}
Original file line number Diff line number Diff line change @@ -304,7 +304,7 @@ impl GroupSessionManager {
304
304
. or_insert_with ( BTreeMap :: new)
305
305
. insert ( device_id, share_info) ;
306
306
}
307
- MaybeEncryptedRoomKey :: Withheld { .. } => {
307
+ MaybeEncryptedRoomKey :: MissingSession => {
308
308
result_builder. on_missing_session ( result. device ) ;
309
309
}
310
310
}
You can’t perform that action at this time.
0 commit comments