File tree 1 file changed +5
-12
lines changed
bindings/matrix-sdk-crypto-js/src
1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -633,24 +633,17 @@ impl OlmMachine {
633
633
. collect ( )
634
634
}
635
635
636
- /// Receive an unencrypted verification event.
636
+ /// Receive a verification event.
637
637
///
638
638
/// 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 > {
646
642
let event: ruma:: events:: AnyMessageLikeEvent = serde_json:: from_str ( event) ?;
647
643
let me = self . inner . clone ( ) ;
648
644
649
645
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 ) ?)
654
647
} ) )
655
648
}
656
649
You can’t perform that action at this time.
0 commit comments