mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-25 01:28:21 -04:00
fix(examples): Fix the in-room emoji verification example
This commit is contained in:
@@ -153,6 +153,26 @@ async fn login(homeserver_url: String, username: &str, password: &str) -> matrix
|
||||
.expect("Can't accept verification request");
|
||||
}
|
||||
}
|
||||
AnySyncMessageLikeEvent::KeyVerificationStart(
|
||||
SyncMessageLikeEvent::Original(e),
|
||||
) => {
|
||||
if let Some(Verification::SasV1(sas)) = client
|
||||
.encryption()
|
||||
.get_verification(
|
||||
&e.sender,
|
||||
e.content.relates_to.event_id.as_str(),
|
||||
)
|
||||
.await
|
||||
{
|
||||
println!(
|
||||
"Starting verification with {} {}",
|
||||
&sas.other_device().user_id(),
|
||||
&sas.other_device().device_id()
|
||||
);
|
||||
print_devices(&e.sender, client).await;
|
||||
sas.accept().await.unwrap();
|
||||
}
|
||||
}
|
||||
AnySyncMessageLikeEvent::KeyVerificationKey(
|
||||
SyncMessageLikeEvent::Original(e),
|
||||
) => {
|
||||
@@ -167,7 +187,7 @@ async fn login(homeserver_url: String, username: &str, password: &str) -> matrix
|
||||
tokio::spawn(wait_for_confirmation((*client).clone(), sas));
|
||||
}
|
||||
}
|
||||
AnySyncMessageLikeEvent::KeyVerificationMac(
|
||||
AnySyncMessageLikeEvent::KeyVerificationDone(
|
||||
SyncMessageLikeEvent::Original(e),
|
||||
) => {
|
||||
if let Some(Verification::SasV1(sas)) = client
|
||||
|
||||
Reference in New Issue
Block a user