Skip to content

Commit 35501df

Browse files
committed
Skip device verification checks for sending (this would otherwise exclude spa guests)
1 parent 8d0b69e commit 35501df

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

crates/matrix-sdk/src/widget/matrix.rs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,11 @@ mod to_device_crypto {
399399
let content = content.clone();
400400

401401
async move {
402-
if !device.is_cross_signed_by_owner() {
403-
info!("Device {} is not verified, skipping encryption", device.device_id());
404-
return None;
405-
}
402+
// This is not yet used. It is incompatible with the spa guest mode (the spa will not verify its crypto identity)
403+
// if !device.is_cross_signed_by_owner() {
404+
// info!("Device {} is not verified, skipping encryption", device.device_id());
405+
// return None;
406+
// }
406407
match device
407408
.inner
408409
.encrypt_event_raw(&event_type.to_string(), &content)
@@ -437,14 +438,15 @@ mod to_device_crypto {
437438
warn!("Failed to get user devices for user: {}", user_id);
438439
return None;
439440
};
440-
let Ok(user_identity) = client.encryption().get_user_identity(&user_id).await else{
441-
warn!("Failed to get user identity for user: {}", user_id);
442-
return None;
443-
};
444-
if user_identity.map(|i|i.has_verification_violation()).unwrap_or(false) {
445-
info!("User {} has a verification violation, skipping encryption", user_id);
446-
return None;
447-
}
441+
// This is not yet used. It is incompatible with the spa guest mode (the spa will not verify its crypto identity)
442+
// let Ok(user_identity) = client.encryption().get_user_identity(&user_id).await else{
443+
// warn!("Failed to get user identity for user: {}", user_id);
444+
// return None;
445+
// };
446+
// if user_identity.map(|i|i.has_verification_violation()).unwrap_or(false) {
447+
// info!("User {} has a verification violation, skipping encryption", user_id);
448+
// return None;
449+
// }
448450
let devices: Vec<Device> = match device_or_all_id {
449451
DeviceIdOrAllDevices::DeviceId(device_id) => {
450452
vec![user_devices.get(&device_id)].into_iter().flatten().collect()

0 commit comments

Comments
 (0)