Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Late decryptions don't update RepliedToEvent #3113

Open
ara4n opened this issue Aug 4, 2024 · 2 comments
Open

Late decryptions don't update RepliedToEvent #3113

ara4n opened this issue Aug 4, 2024 · 2 comments
Labels
A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue

Comments

@ara4n
Copy link
Member

ara4n commented Aug 4, 2024

“Unsupported event” shown as reply, despite event being supported

Steps to reproduce

  1. Flip through scrollback
  2. Note that some embedded replies are corrupt, saying “unsupported event”.
  3. Tap on the embedded reply, which takes you to a perfectly valid event (higlighted in the example below):

IMG_7948

My guess is that at the point the reply was rendered the original event hadn’t been backpaginated or decrypted yet, hence the corruption. Perhaps the reply doesn’t update once the msg keys are fished out of backup? And the “unsupported event” is a lie and should be “unable to decrypt”?

the wobbly reply is:

https://matrix.to/#/!cnVVNLKqgUzNTOFQkz:matrix.org/$0LXqcUfxoYTiFq2KLgi9tYb8MpG0FAqnEPRiTvcy9rc?via=matrix.org&via=element.io&via=jki.re


EventTimelineItem {
    sender: "@matthew:matrix.org",
    sender_profile: Ready(
        Profile {
            display_name: Some(
                "Matthew",
            ),
            display_name_ambiguous: false,
            avatar_url: Some(
                "mxc://matrix.org/oUxxDyzQOHdVDMxgwFzyCWEe",
            ),
        },
    ),
    timestamp: 2024-07-30T17:20:02.024,
    content: Message(
        Message {
            in_reply_to: Some(
                InReplyToDetails {
                    event_id: "$OyqahQ2M3d8M7zXZ8jFy0thYsrV51ejEzf9P-GWA-OA",
                    event: Ready(
                        RepliedToEvent {
                            content: UnableToDecrypt(
                                MegolmV1AesSha2 {
                                    sender_key: "8U6RZ9St2kR6IZd8PCNXt4NGsLlMNUhKhq8C12mBPF8",
                                    device_id: "OCBXEUUWBE",
                                    session_id: "u9mUgbw9wjYuRSr7IoGEfBwa6Rk9N6i+teWGv9tSGYM",
                                    cause: Unknown,
                                },
                            ),
                            sender: "@matthew:matrix.org",
                            sender_profile: Ready(
                                Profile {
                                    display_name: Some(
                                        "Matthew",
                                    ),
                                    display_name_ambiguous: false,
                                    avatar_url: Some(
                                        "mxc://matrix.org/oUxxDyzQOHdVDMxgwFzyCWEe",
                                    ),
                                },
                            ),
                        },
                    ),
                },
            ),
            thread_root: None,
            edited: false,
            ..
        },
    ),
    kind: Remote(
        RemoteEventTimelineItem {
            event_id: "$I6hNJYaQHDoPUKfWJCoCyrsOTt2YP9fawoLHTF0W2z0",
            transaction_id: None,
            reactions: {},
            read_receipts: {},
            is_own: true,
            is_highlighted: false,
            encryption_info: Some(
                EncryptionInfo {
                    sender: "@matthew:matrix.org",
                    sender_device: None,
                    algorithm_info: MegolmV1AesSha2 {
                        curve25519_key: "74mkEb0CXv/l34cGsSvuODR2bOQ/E3aVKzdX+rlKfmQ",
                        sender_claimed_keys: {
                            "ed25519": "fhmV+gOftT4tWim9ZTbMjTDmJr5aBZ5cicd3wTE/afY",
                        },
                    },
                    verification_state: Unverified(
                        None(
                            InsecureSource,
                        ),
                    ),
                },
            ),
            origin: Pagination,
            ..
        },
    ),
}

{
  "sender" : "@matthew:matrix.org",
  "content" : {
    "body" : "> <@matthew:matrix.org> although these did eventually resolve; it might have been super slow sync? or perhaps it fished them out of backup\n\nhttps:\/\/github.com\/element-hq\/element-x-ios-rageshakes\/issues\/2036",
    "format" : "org.matrix.custom.html",
    "formatted_body" : "<mx-reply><blockquote><a href=\"https:\/\/matrix.to\/#\/!cnVVNLKqgUzNTOFQkz:matrix.org\/$OyqahQ2M3d8M7zXZ8jFy0thYsrV51ejEzf9P-GWA-OA\">In reply to<\/a> <a href=\"https:\/\/matrix.to\/#\/@matthew:matrix.org\">@matthew:matrix.org<\/a><br>although these did eventually resolve; it might have been super slow sync? or perhaps it fished them out of backup<\/blockquote><\/mx-reply>https:\/\/github.com\/element-hq\/element-x-ios-rageshakes\/issues\/2036",
    "m.relates_to" : {
      "m.in_reply_to" : {
        "event_id" : "$OyqahQ2M3d8M7zXZ8jFy0thYsrV51ejEzf9P-GWA-OA"
      }
    },
    "m.mentions" : {

    },
    "msgtype" : "m.text"
  },
  "origin_server_ts" : 1722360002024,
  "room_id" : "!cnVVNLKqgUzNTOFQkz:matrix.org",
  "event_id" : "$I6hNJYaQHDoPUKfWJCoCyrsOTt2YP9fawoLHTF0W2z0",
  "type" : "m.room.message",
  "unsigned" : {
    "age" : 416775976,
    "membership" : "join"
  }
}

Outcome

What did you expect?

accurate replies

What happened instead?

corrupt reply previews

Your phone model

No response

Operating system version

No response

Application version

666

Homeserver

No response

Will you send logs?

No

@pixlwave
Copy link
Member

pixlwave commented Aug 5, 2024

Closing as duplicate of #1286.

@pixlwave pixlwave closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
@pixlwave
Copy link
Member

pixlwave commented Aug 5, 2024

Ooops, they're rendered differently.

@pixlwave pixlwave reopened this Aug 5, 2024
@pixlwave pixlwave added X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue A-Timeline T-Defect S-Minor Impairs non-critical functionality or suitable workarounds exist O-Occasional Affects or can be seen by some users regularly or most users rarely labels Aug 5, 2024
@pixlwave pixlwave changed the title “Unsupported event” shown as reply, despite event being supported Late decryptions don't update RepliedToEvent Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue
Projects
None yet
Development

No branches or pull requests

2 participants