crypto: Add a getter for the room id for the SAS verifications

This commit is contained in:
Damir Jelić 2021-06-25 12:56:30 +02:00
parent af084528c8
commit 728d298810

View file

@ -89,6 +89,15 @@ impl Sas {
&self.flow_id
}
/// Get the room id if the verification is happening inside a room.
pub fn room_id(&self) -> Option<&RoomId> {
if let FlowId::InRoom(r, _) = self.flow_id() {
Some(r)
} else {
None
}
}
/// Does this verification flow support displaying emoji for the short
/// authentication string.
pub fn supports_emoji(&self) -> bool {