Skip to content

Unable to decrypt redacted messages (+ issue with threads in those cases) #3189

Description

@panicrune

Bug Description

There is a consistent, reproduceable way to cause a "message not decyptable". (strikethrough is intentional, because it always shows like this in the client (tested both on desktop(linux) and android clients)

This happening causes a cascading problem:
If this message is the first message of a thread, the whole thread becomes unavailable because the button to enter the thread contents is not shown. I assume this is the case because this '[usericon] message not decryptable' is treated diffently then a different message, or the code path to render the thread button doesnt even run as it is terminated when the message is not decryptable. (Note: these are wild guesses, unfortunately i have not had the time to get into dart and dig into the code myself)

Image (some of these include threads, which i cannot possibly show via the screenshot as it doesnt work)

Steps to Reproduce

  1. send a message in a room
  2. redact said message
  3. log in on a new session and syncronize your keys with chat backup (sometimes it is enough to restart the client, and there are other conditions that can trigger it, but logging out and back in, or loggin in on a new session is the only way i found to reliably reproduce the issue)
  4. -> you will observe the most recent event in that chat to be: '[usericon] message not decryptable'
  5. -> redaction reason is not shown either because of this

Note

Redacted messages show fine when the receiving client was online to receive the unredacted message, but as soon as a condition happens where the receiving client doesnt seem to know the original (unredacted) message it breaks, as is the case with new logins, or even if the client was offline during the whole "message, redact" cycle.

Expected Behavior

It should show the message as redacted and display the redaction reason as normal (or hide it if the preference "flutter.chat.fluffy.hideRedactedEvents":true is set)

To allow properly working with threads, the threads button should also be shown if the original message was an invalid or unknown event, to avoid missing entire threads because of single bad messages.

App Version

2.7.2

Platform

Linux (Other)

Additional Platform Information

Linux-x86_64 NixOS (patched version from NixOS/nixpkgs#534196 for the 2.7.2 version), Also reproduced on Android

Additional Context

This issue is actively impeading a workflow of mine at the moment and is pretty annoying.
If you need any additional info to help with the fix im happy to help however i can.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions