Skip to content

Commit

Permalink
chore!(encryption): rename are_we_the_last_man_standing to `is_last…
Browse files Browse the repository at this point in the history
…_device`

While the former name is arguably more fun, the latter is more
descriptive of what the function does.
  • Loading branch information
bnjbvr committed Jan 13, 2025
1 parent 9514388 commit 8682d5f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bindings/matrix-sdk-ffi/src/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl Encryption {
}

pub async fn is_last_device(&self) -> Result<bool> {
Ok(self.inner.recovery().are_we_the_last_man_standing().await?)
Ok(self.inner.recovery().is_last_device().await?)
}

pub async fn wait_for_backup_upload_steady_state(
Expand Down
1 change: 1 addition & 0 deletions crates/matrix-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ All notable changes to this project will be documented in this file.
call `AttachmentConfig::new().thumbnail(thumbnail)` now instead.
- [**breaking**] `Room::send_attachment()` and `RoomSendQueue::send_attachment()`
now take any type that implements `Into<String>` for the filename.
- [**breaking**] `Recovery::are_we_the_last_man_standing()` has been renamed to `is_last_device()`.

## [0.9.0] - 2024-12-18

Expand Down
2 changes: 1 addition & 1 deletion crates/matrix-sdk/src/encryption/recovery/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ impl Recovery {
/// If the user does not enable recovery before logging out of their last
/// device, they will not be able to decrypt historic messages once they
/// create a new device.
pub async fn are_we_the_last_man_standing(&self) -> Result<bool> {
pub async fn is_last_device(&self) -> Result<bool> {
let olm_machine = self.client.olm_machine().await;
let olm_machine = olm_machine.as_ref().ok_or(crate::Error::NoOlmMachine)?;
let user_id = olm_machine.user_id();
Expand Down

0 comments on commit 8682d5f

Please sign in to comment.