Skip to content

Commit a91a371

Browse files
committed
fixup! fixup! refactor!(crypto): Don't process in-room verification implicitly
1 parent 90b7840 commit a91a371

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

bindings/matrix-sdk-crypto-js/src/machine.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -633,24 +633,17 @@ impl OlmMachine {
633633
.collect()
634634
}
635635

636-
/// Receive an unencrypted verification event.
636+
/// Receive a verification event.
637637
///
638638
/// This method can be used to pass verification events that are
639-
/// happening in unencrypted rooms to the `OlmMachine`.
640-
///
641-
/// Note: This does not need to be called for encrypted events
642-
/// since those will get passed to the `OlmMachine` during
643-
/// decryption.
644-
#[wasm_bindgen(js_name = "receiveUnencryptedVerificationEvent")]
645-
pub fn receive_unencrypted_verification_event(&self, event: &str) -> Result<Promise, JsError> {
639+
/// happening in rooms to the `OlmMachine`.
640+
#[wasm_bindgen(js_name = "receiveVerificationEvent")]
641+
pub fn receive_verification_event(&self, event: &str) -> Result<Promise, JsError> {
646642
let event: ruma::events::AnyMessageLikeEvent = serde_json::from_str(event)?;
647643
let me = self.inner.clone();
648644

649645
Ok(future_to_promise(async move {
650-
Ok(me
651-
.receive_unencrypted_verification_event(&event)
652-
.await
653-
.map(|_| JsValue::UNDEFINED)?)
646+
Ok(me.receive_verification_event(&event).await.map(|_| JsValue::UNDEFINED)?)
654647
}))
655648
}
656649

0 commit comments

Comments
 (0)