/// Get a tuple of device and one-time keys that need to be uploaded.
///
/// Returns None if no keys need to be uploaded.
Get a tuple of device and one-time keys that need to be uploaded.
Returns None if no keys need to be uploaded.
Get a tuple of device and one - time keys that need to be uploaded . Returns None if no keys need to be uploaded .
pub(crate) async fn keys_for_upload(
        &self,
    ) -> Option<(Option<DeviceKeys>, BTreeMap<Box<DeviceKeyId>, Raw<OneTimeKey>>)> {
        if !self.should_upload_keys().await {
            return None;
        }
        let device_keys = if !self.shared() { Some(self.device_keys().await) } else { None };
        let one_time_keys = self.signed_one_time_keys().await.ok().unwrap_or_default();
        Some((device_keys, one_time_keys))
    }
pub ( crate ) async fn keys_for_upload ( & self , ) -> Option < ( Option < DeviceKeys > , BTreeMap < Box < DeviceKeyId > , Raw < OneTimeKey > > ) > { if ! self . should_upload_keys ( ) . await { return None ; } let device_keys = if ! self . shared ( ) { Some ( self . device_keys ( ) . await ) } else { None } ; let one_time_keys = self . signed_one_time_keys ( ) . await . ok ( ) . unwrap_or_default ( ) ; Some ( ( device_keys , one_time_keys ) ) }
Get a tuple of device and one-time keys that need to be uploaded.
Get a tuple of device and one - time keys that need to be uploaded .
&self