From 68cc73e0d92436f1efca0c95da6d3f15ad124964 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Fri, 13 Dec 2024 10:11:00 +0000 Subject: [PATCH] Simplify flow chart --- .../src/types/events/utd_cause.rs | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/crates/matrix-sdk-crypto/src/types/events/utd_cause.rs b/crates/matrix-sdk-crypto/src/types/events/utd_cause.rs index cb010796522..42be623f858 100644 --- a/crates/matrix-sdk-crypto/src/types/events/utd_cause.rs +++ b/crates/matrix-sdk-crypto/src/types/events/utd_cause.rs @@ -196,24 +196,22 @@ impl UtdCause { * Below is the flow chart we follow for deciding whether historical * UTDs are expected. This function starts at position `B`. * - * ```mermaid - * flowchart TD - * A{Is the message newer than the device?} - * A -- No --> B - * A -- Yes --> X - * B{Is there a backup on the server?} - * B -- No --> Y - * B -- Yes --> C - * C{Is backup working on this device?} - * C -- No --> D - * C -- Yes --> X - * D{Is this device verified?} - * D -- No --> Z - * D -- Yes --> X + * ```text + * A: Is the message newer than the device? + * No -> B + * Yes - Normal UTD error * - * X([Normal UTD error]) - * Y([History is not available on this device]) - * Z([You need to verify this device]) + * B: Is there a backup on the server? + * No -> History is not available on this device + * Yes -> C + * + * C: Is backup working on this device? + * No -> D + * Yes -> Normal UTD error + * + * D: Is this device verified? + * No -> You need to verify this device + * Yes -> Normal UTD error * ``` */ fn determine_historical(crypto_context_info: CryptoContextInfo) -> UtdCause {