crypto: Log a warning if we get a start event without being ready
parent
069ef3a661
commit
12619ab8b3
|
@ -387,11 +387,16 @@ impl VerificationRequest {
|
||||||
sender: &UserId,
|
sender: &UserId,
|
||||||
content: impl Into<StartContent<'a>>,
|
content: impl Into<StartContent<'a>>,
|
||||||
) -> Result<(), CryptoStoreError> {
|
) -> Result<(), CryptoStoreError> {
|
||||||
match &*self.inner.lock().unwrap() {
|
let content = content.into();
|
||||||
InnerRequest::Created(_) => {}
|
|
||||||
InnerRequest::Requested(_) => {}
|
if let InnerRequest::Ready(s) = &*self.inner.lock().unwrap() {
|
||||||
InnerRequest::Ready(s) => s.receive_start(sender, content).await?,
|
s.receive_start(sender, content).await?;
|
||||||
InnerRequest::Passive(_) => {}
|
} else {
|
||||||
|
warn!(
|
||||||
|
sender = sender.as_str(),
|
||||||
|
device_id = content.from_device().as_str(),
|
||||||
|
"Received a key verification start event but we're not yet in the ready state"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue