state-res: Update verify_third_party_invite signature

Use &UserId instead of &str.
This commit is contained in:
Jonas Platte 2021-09-03 21:46:33 +02:00
parent 76fa15f248
commit 40f99cb364
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -418,7 +418,7 @@ where
false false
} else { } else {
let allow = verify_third_party_invite( let allow = verify_third_party_invite(
Some(state_key), Some(&target_user_id),
user_sender, user_sender,
&tp_id, &tp_id,
current_third_party_invite, current_third_party_invite,
@ -854,7 +854,7 @@ where
} }
pub fn verify_third_party_invite<E: Event>( pub fn verify_third_party_invite<E: Event>(
user_state_key: Option<&str>, target_user: Option<&UserId>,
sender: &UserId, sender: &UserId,
tp_id: &ThirdPartyInvite, tp_id: &ThirdPartyInvite,
current_third_party_invite: Option<Arc<E>>, current_third_party_invite: Option<Arc<E>>,
@ -863,7 +863,7 @@ pub fn verify_third_party_invite<E: Event>(
// checking for mxid and token keys is done by ruma when deserializing // checking for mxid and token keys is done by ruma when deserializing
// The state key must match the invitee // The state key must match the invitee
if user_state_key != Some(tp_id.signed.mxid.as_str()) { if target_user != Some(&tp_id.signed.mxid) {
return false; return false;
} }