Bug 504348

Summary: E2EE does not receive encryption keys while other clients do
Product: [Applications] NeoChat Reporter: mihail_a_m
Component: GeneralAssignee: Tobias Fella <fella>
Status: RESOLVED LATER    
Severity: normal CC: carl, josh
Priority: NOR    
Version First Reported In: 25.04.1   
Target Milestone: ---   
Platform: NixOS   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description mihail_a_m 2025-05-16 17:18:54 UTC
SUMMARY
E2EE sometimes doesn't receive keys when it should. This includes both encrypted group chats and DMs.

STEPS TO REPRODUCE
1. Set up a fresh synapse instance, add mautrix-telegram puppeting bridge, add a user. (Or use a public instance)
2. Login inside fractal (or other client), obtain security key
3. Login inside neochat, cross-verify with the other client. Just in case, you can also paste security key into appropriate dev menu.
4. Open a DM with the bridge bot, log into telegram. (Have at least one DM inside telegram, even with telegram itself to receive auth code)
5. Observe synced DMs

OBSERVED RESULT
Other client successfully decrypts all messages, NeoChat decrypts none, instead displaying "This message is encrypted and the sender has not shared the key with this device".

EXPECTED RESULT
NeoChat decrypts DMs successfully.

SOFTWARE/OS VERSIONS
Linux: NixOS 25.05 (Warbler) (Wayland) / linux 6.14.6
KDE Plasma Version: not installed
KDE Frameworks Version: 6.14.0
Qt Version: Using 6.9.0 and built against 6.9.0
libQuotient: 0.9.1 (built against 0.9.1)

ADDITIONAL INFORMATION
This can also be reproduced by other means, but this one seems to be 100% reliable and is the most noticeable for me. Mautrix-whatsapp probably also does that, but I couldn't set it up on my homeserver due to technical difficulties.

This doesn't seem to be an issue with the bridge specifically, since other clients work correctly and this also happens in regular chats too.