Skip to content

Commit

Permalink
Remove workaround for ruma/ruma#1940
Browse files Browse the repository at this point in the history
  • Loading branch information
andybalaam committed Nov 1, 2024
1 parent 0b64f39 commit ef36c57
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/identifiers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,7 @@ impl DeviceKeyId {
/// Returns device ID of the device key ID.
#[wasm_bindgen(getter, js_name = "deviceId")]
pub fn device_id(&self) -> DeviceId {
// TODO: when https://github.com/ruma/ruma/issues/1940 is fixed,
// this should just be:
//self.inner.key_name().to_owned().into()

let key_id = self.inner.to_string();

let colon_pos =
key_id.find(":").expect("Key should not have parsed if it did not contain ':'");

DeviceId::new(&key_id[(colon_pos + 1)..])
self.inner.key_name().to_owned().into()
}

/// Return the device key ID as a string.
Expand Down

0 comments on commit ef36c57

Please sign in to comment.