Skip to content

Commit 8682d5f

Browse files
committed
chore!(encryption): rename are_we_the_last_man_standing to is_last_device
While the former name is arguably more fun, the latter is more descriptive of what the function does.
1 parent 9514388 commit 8682d5f

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

bindings/matrix-sdk-ffi/src/encryption.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ impl Encryption {
281281
}
282282

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

287287
pub async fn wait_for_backup_upload_steady_state(

crates/matrix-sdk/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ All notable changes to this project will be documented in this file.
2828
call `AttachmentConfig::new().thumbnail(thumbnail)` now instead.
2929
- [**breaking**] `Room::send_attachment()` and `RoomSendQueue::send_attachment()`
3030
now take any type that implements `Into<String>` for the filename.
31+
- [**breaking**] `Recovery::are_we_the_last_man_standing()` has been renamed to `is_last_device()`.
3132

3233
## [0.9.0] - 2024-12-18
3334

crates/matrix-sdk/src/encryption/recovery/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ impl Recovery {
462462
/// If the user does not enable recovery before logging out of their last
463463
/// device, they will not be able to decrypt historic messages once they
464464
/// create a new device.
465-
pub async fn are_we_the_last_man_standing(&self) -> Result<bool> {
465+
pub async fn is_last_device(&self) -> Result<bool> {
466466
let olm_machine = self.client.olm_machine().await;
467467
let olm_machine = olm_machine.as_ref().ok_or(crate::Error::NoOlmMachine)?;
468468
let user_id = olm_machine.user_id();

0 commit comments

Comments
 (0)