Skip to content

[BUG] Encrypted replied-to messages are not decrypted in reply previews #214

Description

@thomas-quant

Prerequisites

  • I have searched existing issues and found no duplicates
  • I have checked the FAQ/Wiki and found no solution

Description

When a message replies to an encrypted message, GoofCord decrypts the outer message body but not the embedded replied-to message. Discord therefore displays the configured encryption cover in the reply preview instead of the decrypted content.

I intend to work on a fix and submit a PR.

Steps to Reproduce

  1. Enable message encryption and configure an encryption cover and password.
  2. Send an encrypted message.
  3. Reply to that encrypted message.
  4. View the resulting reply and its replied-to preview.

Expected Behavior

The replied-to preview should display the decrypted content when one of the configured keys can decrypt the referenced message.

Actual Behavior

The main message body is decrypted normally, but the compact replied-to preview displays the configured encryption cover.

Screenshots

The encrypted message decrypts normally while its reply preview displays the configured cover:

Encrypted replied-to message showing its cover in the reply preview

Operating System

Windows 10

GoofCord Version

2.2.2

Installation Method

Installer from GitHub Releases (.exe, .dmg, .deb, .rpm, etc.)

Additional Information

Installed using the Windows x64 .exe installer.

Discord supplies the resolved replied-to message as a nested referenced_message object. The current Flux handler decrypts only dispatch.message.content; it does not process dispatch.message.referenced_message.content.

The fix should decrypt nested message objects before the original Flux dispatch reaches Discord's message stores. It should prefer the nested message's own channel_id, then message_reference.channel_id, then the outer dispatch channel.

The same helper should cover:

  • MESSAGE_CREATE
  • MESSAGE_UPDATE
  • LOAD_MESSAGES_SUCCESS
  • SEARCH_FINISH
  • MOD_VIEW_SEARCH_FINISH

Related cases worth checking are thread-starter references and forwarded-message snapshots under messageSnapshots[].message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions