feat: no unencrypted chat when securejoin times out (#6722)

this PR leaves one-to-one chats that were created by a QR code scan
unwritable until e2ee is established.

the logic of the timeout is reused to show a message with additional
information:

<img width=250
src=https://github.com/user-attachments/assets/b9928e7b-8128-4d7a-934d-37d51c8275ce>
<img width=250
src=https://github.com/user-attachments/assets/4a3a28e9-4491-47f9-8962-86aa2302dd21>
<img width=250
src=https://github.com/user-attachments/assets/5130a87c-ba1c-496f-81e1-899dc8aabe4e>

if the secure-join finishes faster than the 15 seconds, the middle
message is not shown.

closes #6706
This commit is contained in:
bjoern
2025-04-01 16:53:37 +02:00
committed by GitHub
parent 70563867a6
commit ee079ce021
4 changed files with 45 additions and 34 deletions

View File

@@ -7569,9 +7569,14 @@ void dc_event_unref(dc_event_t* event);
/// "Could not yet establish guaranteed end-to-end encryption, but you may already send a message."
///
/// Used as info message.
/// @deprecated 2025-03
#define DC_STR_SECUREJOIN_WAIT_TIMEOUT 191
/// "This takes longer than expected, maybe devices are offline…\n\nHowever, the process continues in background, you can do something else"
///
/// Used as info message.
#define DC_STR_SECUREJOIN_TAKES_LONGER 192
/// "Contact". Deprecated, currently unused.
#define DC_STR_CONTACT 200