@@ -62,9 +62,8 @@ use crate::{
62
62
gossiping:: GossipMachine ,
63
63
identities:: { user:: UserIdentities , Device , IdentityManager , UserDevices } ,
64
64
olm:: {
65
- Account , CrossSigningStatus , EncryptionSettings , ExportedRoomKey , IdentityKeys ,
66
- InboundGroupSession , OlmDecryptionInfo , PrivateCrossSigningIdentity , SessionType ,
67
- StaticAccountData ,
65
+ Account , CrossSigningStatus , EncryptionSettings , IdentityKeys , InboundGroupSession ,
66
+ OlmDecryptionInfo , PrivateCrossSigningIdentity , SessionType , StaticAccountData ,
68
67
} ,
69
68
requests:: { IncomingResponse , OutgoingRequest , UploadSigningKeysRequest } ,
70
69
session_manager:: { GroupSessionManager , SessionManager } ,
@@ -91,7 +90,7 @@ use crate::{
91
90
utilities:: timestamp_to_iso8601,
92
91
verification:: { Verification , VerificationMachine , VerificationRequest } ,
93
92
CrossSigningKeyExport , CryptoStoreError , KeysQueryRequest , LocalTrust , ReadOnlyDevice ,
94
- RoomKeyImportResult , SignatureError , ToDeviceRequest ,
93
+ SignatureError , ToDeviceRequest ,
95
94
} ;
96
95
97
96
/// State machine implementation of the Olm/Megolm encryption protocol used for
@@ -1783,53 +1782,6 @@ impl OlmMachine {
1783
1782
self . store ( ) . get_user_devices ( user_id) . await
1784
1783
}
1785
1784
1786
- /// Import the given room keys into our store.
1787
- ///
1788
- /// # Arguments
1789
- ///
1790
- /// * `exported_keys` - A list of previously exported keys that should be
1791
- /// imported into our store. If we already have a better version of a key
1792
- /// the key will *not* be imported.
1793
- ///
1794
- /// * `from_backup` - Were the room keys imported from the backup, if true
1795
- /// will mark the room keys as already backed up. This will prevent backing
1796
- /// up keys that are already backed up.
1797
- ///
1798
- /// Returns a tuple of numbers that represent the number of sessions that
1799
- /// were imported and the total number of sessions that were found in the
1800
- /// key export.
1801
- ///
1802
- /// # Examples
1803
- ///
1804
- /// ```no_run
1805
- /// # use std::io::Cursor;
1806
- /// # use matrix_sdk_crypto::{OlmMachine, decrypt_room_key_export};
1807
- /// # use ruma::{device_id, user_id};
1808
- /// # let alice = user_id!("@alice:example.org");
1809
- /// # async {
1810
- /// # let machine = OlmMachine::new(&alice, device_id!("DEVICEID")).await;
1811
- /// # let export = Cursor::new("".to_owned());
1812
- /// let exported_keys = decrypt_room_key_export(export, "1234").unwrap();
1813
- /// machine.import_room_keys(exported_keys, false, |_, _| {}).await.unwrap();
1814
- /// # };
1815
- /// ```
1816
- #[ deprecated(
1817
- since = "0.7.0" ,
1818
- note = "Use the OlmMachine::store::import_room_keys method instead"
1819
- ) ]
1820
- pub async fn import_room_keys (
1821
- & self ,
1822
- exported_keys : Vec < ExportedRoomKey > ,
1823
- from_backup : bool ,
1824
- progress_listener : impl Fn ( usize , usize ) ,
1825
- ) -> StoreResult < RoomKeyImportResult > {
1826
- let backup_version =
1827
- if from_backup { self . backup_machine ( ) . backup_version ( ) . await } else { None } ;
1828
- self . store ( )
1829
- . import_room_keys ( exported_keys, backup_version. as_deref ( ) , progress_listener)
1830
- . await
1831
- }
1832
-
1833
1785
/// Get the status of the private cross signing keys.
1834
1786
///
1835
1787
/// This can be used to check which private cross signing keys we have
0 commit comments