state-res: Don't call .to_string() for server name comparison

This commit is contained in:
Jonas Platte 2021-09-04 01:12:35 +02:00
parent 7f4eba5a5c
commit f9f4106757
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -192,7 +192,7 @@ where
info!("starting m.room.aliases check"); info!("starting m.room.aliases check");
// If sender's domain doesn't matches state_key, reject // If sender's domain doesn't matches state_key, reject
if incoming_event.state_key() != Some(sender.server_name().to_string()) { if incoming_event.state_key().as_deref() != Some(sender.server_name().as_str()) {
warn!("state_key does not match sender"); warn!("state_key does not match sender");
return Ok(false); return Ok(false);
} }