We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0a82d3 commit 476c476Copy full SHA for 476c476
src/identifiers.rs
@@ -120,7 +120,16 @@ impl DeviceKeyId {
120
/// Returns device ID of the device key ID.
121
#[wasm_bindgen(getter, js_name = "deviceId")]
122
pub fn device_id(&self) -> DeviceId {
123
- self.inner.device_id().to_owned().into()
+ // TODO: when https://github.com/ruma/ruma/issues/1940 is fixed,
124
+ // this should just be:
125
+ //self.inner.key_name().to_owned().into()
126
+
127
+ let key_id = self.inner.to_string();
128
129
+ let colon_pos =
130
+ key_id.find(":").expect("Key should not have parsed if it did not contain ':'");
131
132
+ DeviceId::new(&key_id[(colon_pos + 1)..])
133
}
134
135
/// Return the device key ID as a string.
0 commit comments