crypto: Add a getter for the room id for the SAS verifications
This commit is contained in:
parent
af084528c8
commit
728d298810
1 changed files with 9 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue