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

Element Web and desktop still use "io.element.thread" as the rel_type, causing the mobile app to not display thread messages properly. #27332

Closed
mwnu opened this issue Apr 15, 2024 · 3 comments
Labels
T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter

Comments

@mwnu
Copy link

mwnu commented Apr 15, 2024

Steps to reproduce

The Matrix spec now uses "m.thread" as the namespaced relationship type. This has been implemented in Element Android and iOS, but the web and desktop versions still use "io.element.thread" to represent it, leading to two issues:

Thread messages sent from mobile devices cannot be processed as threads in the web and desktop applications, and vice versa.
Thread messages sent from the web or desktop applications are sometimes not visible on mobile devices, which is troublesome.

This is a thread message I sent from my PC:

  "content": {
    "body": "OK",
    "m.mentions": {},
    "m.relates_to": {
      "event_id": "$xxxxxxxxx-7AyZbJENa8",
      "is_falling_back": true,
      "m.in_reply_to": {
        "event_id": "$xxxxxxxxx-7AyZbJENa8"
      },
      "rel_type": "io.element.thread"
    },
    "msgtype": "m.text"
  }

This is a thread message I sent from my phone:

  "content": {
    "body": "Hello, this is a message in the thread!",
    "format": "org.matrix.custom.html",
    "formatted_body": "Hello, this is a message in the thread!",
    "m.relates_to": {
      "event_id": "$xxxxxxxxxbHujOkKz3Cn5_Q1qMwc",
      "is_falling_back": true,
      "m.in_reply_to": {
        "event_id": "$xxxxxxxxxOkKz3Cn5_Q1qMwc"
      },
      "rel_type": "m.thread"
    },
    "msgtype": "m.text"
  }

They are not compatible.

Outcome

Hope that Element Web and the desktop version also implement "rel_type": "m.thread"

Operating system

windows

Browser information

edge

URL for webapp

No response

Application version

v1.11.64

Homeserver

No response

Will you send logs?

Yes

@mwnu mwnu added the T-Defect label Apr 15, 2024
@t3chguy
Copy link
Member

t3chguy commented Apr 15, 2024

Will you send logs?
Yes

Not seeing any logs from you.

io.element.thread is used when your server is seen to not support m.thread.

@t3chguy t3chguy added the X-Needs-Info This issue is blocked awaiting information from the reporter label Apr 15, 2024
@mwnu
Copy link
Author

mwnu commented Apr 16, 2024

Will you send logs?
Yes

Not seeing any logs from you.

io.element.thread is used when your server is seen to not support m.thread.

I have deployed matrix-org/dendrite:v0.13.7 on my server with msc2836 enabled.
The mobile version of Element can send m.thread messages, and all clients can display them in the message column. However, Element Web and desktop versions can only send io.element.thread, and the replies do not show up on mobile. It might be an issue with client compatibility with Dendrite.
Here are the logs, but I'm afraid they might not contain any useful information.

2024/04/16
13:54:17
INFO[2024-04-16T05:54:17.787275569Z] Sent event to roomserver                      event_id="$B5NkX7KV0tla7jqhrpSKHEa2OovFn_-u516fV9cWK-A" req.id=3iYFHrvRp4rf req.method=PUT req.path="/_matrix/client/v3/rooms/!b1bgJrjbQht4e85f:example.com/send/m.room.message/m1713246845142.1" room_id="!b1bgJrjbQht4e85f:example.com" room_version=10 user_id="@testbot:example.com"
2024/04/16
13:55:21
INFO[2024-04-16T05:55:21.321189219Z] Sent event to roomserver                      event_id="$ub4-6WNWvaT4Z1HPw0l8ddZRIQ2-ovmKZ3bNgy5OJEQ" req.id=lxSZ120FxOfd req.method=PUT req.path="/_matrix/client/v3/rooms/!b1bgJrjbQht4e85f:example.com/send/m.room.message/m1713246908793.0" room_id="!b1bgJrjbQht4e85f:example.com" room_version=10 user_id="@testme:example.com"
2024/04/16
13:57:02
INFO[2024-04-16T05:57:02.677870894Z] Sent event to roomserver                      event_id="$VKR4wGHwjYTSDFU87OU069qmIKQ_nY7ypeqBDaG44sA" req.id=CtTWBbvDpbta req.method=PUT req.path="/_matrix/client/v3/rooms/!b1bgJrjbQht4e85f:example.com/send/m.room.message/m1713247010086.2" room_id="!b1bgJrjbQht4e85f:example.com" room_version=10 user_id="@testbot:example.com"
2024/04/16
13:57:16
INFO[2024-04-16T05:57:16.190620775Z] Fetched 36 events locally                     backwards=true end="" req.id=GhmZ0hiEWuvf req.method=GET req.path="/_matrix/client/r0/rooms/!b1bgJrjbQht4e85f:example.com/messages" start=t231_11123 user_id="@testme:example.com"
2024/04/16
13:57:16
INFO[2024-04-16T05:57:16.210518408Z] Responding                                    backfilled=false backwards=true limit=36 req.id=GhmZ0hiEWuvf req.method=GET req.path="/_matrix/client/r0/rooms/!b1bgJrjbQht4e85f:example.com/messages" request_from=t231_11123 request_to="" response_end=t195_10995 response_start=t231_11123 user_id="@testme:example.com"
2024/04/16
13:59:39
INFO[2024-04-16T05:59:39.256630485Z] Sent event to roomserver                      event_id="$gxc4F8cVRUkLke-FRShxAu8sF2MNW42nWzazAjIX9fU" req.id=6hzdDHbZAKqp req.method=PUT req.path="/_matrix/client/r0/rooms/!b1bgJrjbQht4e85f:example.com/send/m.room.message/$local.59a5c0bb-6391-4a5b-96fc-efc65efb113c" room_id="!b1bgJrjbQht4e85f:example.com" room_version=10 user_id="@testme:example.com"
2024/04/16
14:00:43
INFO[2024-04-16T06:00:43.870630589Z] Sent event to roomserver                      event_id="$5EWyxOo3RiwbNorj1VBawEjcUHbUVEISYuwrIIXe660" req.id=C2WukOzRWYcM req.method=PUT req.path="/_matrix/client/v3/rooms/!b1bgJrjbQht4e85f:example.com/send/m.room.message/m1713247231251.3" room_id="!b1bgJrjbQht4e85f:example.com" room_version=10 user_id="@testbot:example.com"

image

@t3chguy
Copy link
Member

t3chguy commented Apr 16, 2024

https://spec.matrix.org/v1.10/client-server-api/#threading Threads were not added until Spec v1.4. Dendrite 0.13.7 only supports up to v1.2. The mobile clients are playing fast and loose with the spec and means they are missing APIs so you will encounter edge case issues. This is not how we chose to implement it in web and server support is required. Feel free to re-open an issue if the problem recurs on a compatible homeserver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect X-Needs-Info This issue is blocked awaiting information from the reporter
Projects
None yet
Development

No branches or pull requests

2 participants