matrix-org / matrix-viewer

View the history of public and world readable Matrix rooms
https://archive.matrix.org
Apache License 2.0
73 stars 11 forks source link

Reply missing from timeline: `This reply could not be found` #246

Open bkil opened 1 year ago

bkil commented 1 year ago
{
  "content": {
    "body": "> <@memorysafetybelike:envs.net> I'm always skeptical of supposedly post-quantum messaging apps. There are a lot of fraudulent/scam messaging apps using post-quantum crypto as a marketing point\n\nSee messages around this point. If possible, add this to the chart/doc.",
    "format": "org.matrix.custom.html",
    "formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!sOLQNHloevPHIEWcYN:matrix.org/$vofnzkokpJxtvNEGbZN9fWsCxFJc9UX2CIsQj4ZTW38?via=matrix.org&via=tchncs.de&via=t2bot.io\">In reply to</a> <a href=\"https://matrix.to/#/@memorysafetybelike:envs.net\">@memorysafetybelike:envs.net</a><br>I&#39;m always skeptical of supposedly post-quantum messaging apps. There are a lot of fraudulent/scam messaging apps using post-quantum crypto as a marketing point</blockquote></mx-reply>See messages around this point. If possible, add this to the chart/doc.",
    "m.relates_to": {
      "m.in_reply_to": {
        "event_id": "$vofnzkokpJxtvNEGbZN9fWsCxFJc9UX2CIsQj4ZTW38"
      }
    },
    "msgtype": "m.text"
  },
  "origin_server_ts": 1685362193658,
  "sender": "@bkil:matrix.org",
  "type": "m.room.message",
  "unsigned": {
    "age": 474,
    "transaction_id": "m1685362193523.113"
  },
  "event_id": "$t2pNdVt1_9ViZNaSERJEB4qtGF3mRvZjhGCSHbcFiFY",
  "room_id": "!sOLQNHloevPHIEWcYN:matrix.org"
}

archive matrix org_issues_246_reply_could_not_be_found

Potential solutions

Reword error message

Ultimately, as a user, it is confusing that all I got was a generic error message. If it said This reply could not be found within the last 100 messages, I would be less worried.

https://github.com/matrix-org/matrix-public-archive/labels/Z-Confidence-High

Show a permalink to the event if it can't be displayed in a reply

The event permalink is also missing in this error condition, while an in-reply-to link is present if no such error condition happens. A user could click this permalink to view what is being replied to if it can't be shown inline.

https://github.com/matrix-org/matrix-public-archive/labels/Z-Confidence-High

Show reply fallback

If a message being replied to can't be shown, but the reply contains a reply fallback, show that fallback (with potentially a disclaimer that the wording might have been edited.

https://github.com/matrix-org/matrix-public-archive/labels/Z-Confidence-Medium

MadLittleMods commented 1 year ago

The Matrix Public Archive currently just paginates with /messages?dir=b&limit=100 and shows you those events. So if the reply isn't self-contained within those 100 events, it will just show This reply could not be found since it's not available.

But since the event contains the reply fallback, we could technically show the content based on that (doesn't work completely if the original message being replied to was edited).

One potential solution is to additionally fetch individual events specified in m.in_reply_to but I think ideally the homeserver would just bundle this for us under unsigned to avoid the extra round-trip. And then basically, it's the same problem as https://github.com/matrix-org/matrix-public-archive/issues/8

bkil commented 1 year ago

Thanks for the insight. Would need to think about our options then. Interesting that you prefer megaissues rather than splitting up to more managable ones that you can easier implement, but if it suits you better I'll try to copy it together then.

Reword error message

Ultimately, as a user, it is confusing that all I got was a generic error message. If it said This reply could not be found within the last 100 messages, I would be less worried.

Show reply fallback

If a message being replied to can't be shown, but the reply contains a reply fallback, show that fallback (with potentially a disclaimer that the wording might have been edited.

Show a permalink to the event if it can't be displayed in a reply

The event permalink is also missing in this error condition, while an in-reply-to link is present if no such error condition happens. A user could click this permalink to view what is being replied to if it can't be shown inline.

MadLittleMods commented 1 year ago

It's mainly about having the problem and potential solutions in one place (single source of truth). Otherwise, we will start getting parallel discussions on mostly related things.

Splitting up the issue once we have something more concrete isn't unreasonable though.


This reply could not be found within the last 100 messages

Show a permalink to the event if it can't be displayed in a reply

Both of these sound great to add as an iteration to everything :+1: (PR's welcome)

Related to https://github.com/vector-im/element-web/issues/21536 where I also wanted to add a permalink for the failed reply in Element.