Skip to content

Commit

Permalink
Merge branch 'pilip/deprecate_revocation' into 'master'
Browse files Browse the repository at this point in the history
Core: deprecate revoke_device

See merge request TankerHQ/sdk-rust!21
  • Loading branch information
blastrock committed Jan 26, 2021
2 parents 5acf042 + 087604e commit c41f623
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ impl Core {
/// Revokes one of the user's devices.
///
/// The Tanker status must be `Ready`.
#[deprecated(since = "2.8.0")]
pub async fn revoke_device(&self, device_id: &str) -> Result<(), Error> {
unsafe { ctanker::revoke_device(self.ctanker, device_id).await }
}
Expand Down
1 change: 1 addition & 0 deletions tests/tanker_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ async fn self_revoke() -> Result<(), Error> {
let app = TestApp::get().await;
let tanker = app.start_anonymous(&app.create_identity(None)).await?;

#[allow(deprecated)]
tanker.revoke_device(&tanker.device_id()?).await?;
let err = tanker.encrypt(b"F", &Default::default()).await.unwrap_err();
assert_eq!(err.code(), ErrorCode::DeviceRevoked);
Expand Down

0 comments on commit c41f623

Please sign in to comment.