pub fn verify_policy_server_signature(
room_policy: &RoomPolicyEventContent,
object: &BTreeMap<String, CanonicalJsonValue>,
rules: &RoomVersionRules,
) -> Result<(), VerificationError>Available on crate feature
signatures only.Expand description
Verify that the given event has a valid signature from the given policy server.
If the event is an m.room.policy event with an empty state_key string, this function
succeeds without checking the signature.
For other cases, this returns an error if the signature is missing or invalid.
§Parameters
room_policy: Thecontentof them.room.policyevent in the current state of the room. If there is nom.room.policyevent in the state of the room or it is invalid, it is assumed that the room has no policy server so this function should not be called to check for the policy server signature.object: The JSON object of the event that was signed.rules: The rules of the version of the event’s room.