@@ -51,6 +51,7 @@ use crate::{
51
51
events:: {
52
52
room:: encrypted:: { RoomEncryptedEventContent , ToDeviceEncryptedEventContent } ,
53
53
room_key_bundle:: RoomKeyBundleContent ,
54
+ EventType ,
54
55
} ,
55
56
requests:: ToDeviceRequest ,
56
57
} ,
@@ -267,7 +268,7 @@ impl GroupSessionManager {
267
268
/// Encrypt the given group session key for the given devices and create
268
269
/// to-device requests that sends the encrypted content to them.
269
270
///
270
- /// See also [`Self::encrypt_content_for_devices_helper `] which is similar
271
+ /// See also [`encrypt_key_content_for_devices `] which is similar
271
272
/// but is not specific to group sessions, and does not return the
272
273
/// [`ShareInfo`] data.
273
274
async fn encrypt_session_for (
@@ -761,6 +762,13 @@ impl GroupSessionManager {
761
762
/// a room key bundle to those devices.
762
763
///
763
764
/// Returns a list of to-device requests which must be sent.
765
+ ///
766
+ /// For security reasons, only "safe" [`CollectStrategy`]s are supported, in
767
+ /// which the recipient must have signed their
768
+ /// devices. [`CollectStrategy::AllDevices`] and
769
+ /// [`CollectStrategy::ErrorOnVerifiedUserProblem`] are "unsafe" in this
770
+ /// respect,and are treated the same as
771
+ /// [`CollectStrategy::IdentityBasedStrategy`].
764
772
#[ instrument( skip( self , bundle_data) ) ]
765
773
pub async fn share_room_key_bundle_data (
766
774
& self ,
@@ -791,7 +799,6 @@ impl GroupSessionManager {
791
799
. await ?;
792
800
793
801
let devices = devices. into_values ( ) . flatten ( ) . collect ( ) ;
794
- use crate :: types:: events:: EventType ;
795
802
let event_type = bundle_data. event_type ( ) . to_owned ( ) ;
796
803
let ( requests, _) = self
797
804
. encrypt_key_content_for_devices ( devices, & event_type, bundle_data, & mut changes)
0 commit comments