cinnyapp / cinny

Yet another matrix client
https://cinny.in
GNU Affero General Public License v3.0
1.99k stars 258 forks source link

Threaded replies not working every time #2047

Open filipesmedeiros opened 3 weeks ago

filipesmedeiros commented 3 weeks ago

Describe the bug

According to #1349, replying to a threaded reply should, as far as I can tell, reply within that same thread. This is happening sometimes, but not always. In some cases, it even does something weird where other clients don't see the reply at all. The screenshot below might help.

Screenshot 2024-11-06 at 13 04 52

The "E assim?" message is inside a thread; the "Olá?" message replies to that, but doesn't get put inside the thread.

The video below even shows the messages, in Element, appearing inside the thread and then disappearing (they don't show up outside the thread also).

https://github.com/user-attachments/assets/c9b7ed74-2d17-4399-bb9f-6a98a07ec48e

I will also post the sources for these three messages (the original, the first threaded reply, and the "failed" threaded reply).

The sources Initial message ```javascript { "<== DECRYPTED_EVENT ==>": { "content": { "msgtype": "m.text", "body": "Olá " }, "event_id": "$G3f6k1-xYD5D0L7I9heDezTS6IEKMLypYPv4Lm9h4Kc", "origin_server_ts": 1730861185499, "sender": "@filipe:chat.filipesm.eu", "type": "m.room.message", "unsigned": { "age": 33748570, "m.relations": { "m.thread": { "count": 2, "current_user_participated": true, "latest_event": { "content": { "algorithm": "m.megolm.v1.aes-sha2", "ciphertext": "AwgDEoABnceNA+S1LxDfZ0AhjZgHebPrUErclyloL7pxhpeFzQkgR8Kq5hTp++dFIuqPmsJTyfTaRu52Gv6LuH66CNjEM1wJnLUAR+cFHfPeQ/dGe0Nz6IX2ytKR0HKoFFXav3or1lka1XuWnCh3lZDc27tg6omi76aGnYUA8wSLpEzqj4+3l8Q3KFnsyZtzVPEu8nRc25sh2YZexHcZcjgi/5wawrjSec0jz4zCLcloEwEjsE65TP01S3RQI9yu8QBvUuKRmuia/ivWBwE", "device_id": "PELfujDz1L", "m.relates_to": { "event_id": "$G3f6k1-xYD5D0L7I9heDezTS6IEKMLypYPv4Lm9h4Kc", "is_falling_back": true, "m.in_reply_to": { "event_id": "$CMTH-tUKKa3ZJDY_qf5ka1EeCT2Ca5lmfXhZYOGo_8Y" }, "rel_type": "m.thread" }, "sender_key": "wRzGQwu4M4Gm5UE1vuTnqFyqNEjhgyU85QOkdTk1YnU", "session_id": "QlQEi3IRf6utYPVecqTO6Oad7N+ySGGAcDr8Ebew5JM" }, "event_id": "$gurWt1gh2_Oaut8p56XLmB2CZIFFFi8KxzvAdfjQO8A", "origin_server_ts": 1730861410860, "room_id": "!wzIvctSysYGDinFtVb:matrix.org", "sender": "@filipe:chat.filipesm.eu", "type": "m.room.encrypted", "unsigned": { "transaction_id": "$local.e4e5596e-a9a0-48fd-97b3-5e0c6ec67e63" } } } }, "transaction_id": "$local.f537da89-7792-4e0a-abfd-70fcbded67f3" }, "room_id": "!wzIvctSysYGDinFtVb:matrix.org" }, "<== ORIGINAL_EVENT ==>": { "content": { "algorithm": "m.megolm.v1.aes-sha2", "ciphertext": "AwgBEoABz4N0h9fXxDZjt3q2hpS3H5CDcC7NGsJonDVyCKR4vCSJUNugO/pEO9nxKi2xpNBzZ7frXxY7G+UknYip5n/Jje9X5DACq1kgMIiHdi+5DkPzOXUXWa8OtJkQDu/SrS+CId99nM2/1MypTNfs69S0vieptEVO1H9287Ijxfz3SGD3y5CKeZZtrm0lFjhTwnNZmD3A4kN0SryoIeqiB1v7T6tB9bY+e+dLeaq4cAYPQcz7y0QMrQ17HV1pRPrQ4My02tXZql1d/Q0", "device_id": "PELfujDz1L", "sender_key": "wRzGQwu4M4Gm5UE1vuTnqFyqNEjhgyU85QOkdTk1YnU", "session_id": "QlQEi3IRf6utYPVecqTO6Oad7N+ySGGAcDr8Ebew5JM" }, "event_id": "$G3f6k1-xYD5D0L7I9heDezTS6IEKMLypYPv4Lm9h4Kc", "origin_server_ts": 1730861185499, "sender": "@filipe:chat.filipesm.eu", "type": "m.room.encrypted", "unsigned": { "age": 33748570, "m.relations": { "m.thread": { "count": 2, "current_user_participated": true, "latest_event": { "content": { "algorithm": "m.megolm.v1.aes-sha2", "ciphertext": "AwgDEoABnceNA+S1LxDfZ0AhjZgHebPrUErclyloL7pxhpeFzQkgR8Kq5hTp++dFIuqPmsJTyfTaRu52Gv6LuH66CNjEM1wJnLUAR+cFHfPeQ/dGe0Nz6IX2ytKR0HKoFFXav3or1lka1XuWnCh3lZDc27tg6omi76aGnYUA8wSLpEzqj4+3l8Q3KFnsyZtzVPEu8nRc25sh2YZexHcZcjgi/5wawrjSec0jz4zCLcloEwEjsE65TP01S3RQI9yu8QBvUuKRmuia/ivWBwE", "device_id": "PELfujDz1L", "m.relates_to": { "event_id": "$G3f6k1-xYD5D0L7I9heDezTS6IEKMLypYPv4Lm9h4Kc", "is_falling_back": true, "m.in_reply_to": { "event_id": "$CMTH-tUKKa3ZJDY_qf5ka1EeCT2Ca5lmfXhZYOGo_8Y" }, "rel_type": "m.thread" }, "sender_key": "wRzGQwu4M4Gm5UE1vuTnqFyqNEjhgyU85QOkdTk1YnU", "session_id": "QlQEi3IRf6utYPVecqTO6Oad7N+ySGGAcDr8Ebew5JM" }, "event_id": "$gurWt1gh2_Oaut8p56XLmB2CZIFFFi8KxzvAdfjQO8A", "origin_server_ts": 1730861410860, "room_id": "!wzIvctSysYGDinFtVb:matrix.org", "sender": "@filipe:chat.filipesm.eu", "type": "m.room.encrypted", "unsigned": { "transaction_id": "$local.e4e5596e-a9a0-48fd-97b3-5e0c6ec67e63" } } } }, "transaction_id": "$local.f537da89-7792-4e0a-abfd-70fcbded67f3" }, "room_id": "!wzIvctSysYGDinFtVb:matrix.org" } } ``` Successful threaded reply ```javascript { "<== DECRYPTED_EVENT ==>": { "content": { "msgtype": "m.text", "body": "E assim?", "m.relates_to": { "event_id": "$G3f6k1-xYD5D0L7I9heDezTS6IEKMLypYPv4Lm9h4Kc", "is_falling_back": true, "m.in_reply_to": { "event_id": "$CMTH-tUKKa3ZJDY_qf5ka1EeCT2Ca5lmfXhZYOGo_8Y" }, "rel_type": "m.thread" } }, "event_id": "$gurWt1gh2_Oaut8p56XLmB2CZIFFFi8KxzvAdfjQO8A", "origin_server_ts": 1730861410860, "sender": "@filipe:chat.filipesm.eu", "type": "m.room.message", "unsigned": { "age": 33523209, "transaction_id": "$local.e4e5596e-a9a0-48fd-97b3-5e0c6ec67e63" }, "room_id": "!wzIvctSysYGDinFtVb:matrix.org" }, "<== ORIGINAL_EVENT ==>": { "content": { "algorithm": "m.megolm.v1.aes-sha2", "ciphertext": "AwgDEoABnceNA+S1LxDfZ0AhjZgHebPrUErclyloL7pxhpeFzQkgR8Kq5hTp++dFIuqPmsJTyfTaRu52Gv6LuH66CNjEM1wJnLUAR+cFHfPeQ/dGe0Nz6IX2ytKR0HKoFFXav3or1lka1XuWnCh3lZDc27tg6omi76aGnYUA8wSLpEzqj4+3l8Q3KFnsyZtzVPEu8nRc25sh2YZexHcZcjgi/5wawrjSec0jz4zCLcloEwEjsE65TP01S3RQI9yu8QBvUuKRmuia/ivWBwE", "device_id": "PELfujDz1L", "m.relates_to": { "event_id": "$G3f6k1-xYD5D0L7I9heDezTS6IEKMLypYPv4Lm9h4Kc", "is_falling_back": true, "m.in_reply_to": { "event_id": "$CMTH-tUKKa3ZJDY_qf5ka1EeCT2Ca5lmfXhZYOGo_8Y" }, "rel_type": "m.thread" }, "sender_key": "wRzGQwu4M4Gm5UE1vuTnqFyqNEjhgyU85QOkdTk1YnU", "session_id": "QlQEi3IRf6utYPVecqTO6Oad7N+ySGGAcDr8Ebew5JM" }, "event_id": "$gurWt1gh2_Oaut8p56XLmB2CZIFFFi8KxzvAdfjQO8A", "origin_server_ts": 1730861410860, "sender": "@filipe:chat.filipesm.eu", "type": "m.room.encrypted", "unsigned": { "age": 33523209, "transaction_id": "$local.e4e5596e-a9a0-48fd-97b3-5e0c6ec67e63" }, "room_id": "!wzIvctSysYGDinFtVb:matrix.org" } } ``` "Failed" threaded reply ```javascript { "<== DECRYPTED_EVENT ==>": { "content": { "msgtype": "m.text", "body": "> <@filipe:chat.filipesm.eu> E assim?\n\nOlá?", "format": "org.matrix.custom.html", "formatted_body": "
In reply to@filipe:chat.filipesm.eu
E assim?
Olá?", "m.relates_to": { "m.in_reply_to": { "event_id": "$gurWt1gh2_Oaut8p56XLmB2CZIFFFi8KxzvAdfjQO8A" } } }, "event_id": "$feD1waMDYXUuqCXqEc8imAOOAiXpWEiK0EUfoA3O-8k", "origin_server_ts": 1730890780070, "sender": "@filipe:chat.filipesm.eu", "type": "m.room.message", "unsigned": { "age": 4154222, "transaction_id": "m1730890779820.14" }, "room_id": "!wzIvctSysYGDinFtVb:matrix.org" }, "<== ORIGINAL_EVENT ==>": { "content": { "algorithm": "m.megolm.v1.aes-sha2", "ciphertext": "AwgAEvAD1cqcR+hmp7sTIVm3fVDeZ9JKR6wldOpHVES8u8BWnnuQfSrzYNk1zQd5DgtuiPKWRzVnEUGiv/pc/KfKD32Oi/1aDM3JSq3DEvbPFzRaCiu0nmPPkIpP3Wj615NrLhDktnNcOTK97Qm7m3owCPEptc5DUB3JzeIJBmbWp3DFkbk7wVP9yM4OkkqKnhAMlJdo/UliPk/1lX6uUzEExPtPVAykC+S/P/JkJBN+lXOyr9YGzh1aBVa2+7fyvKqyC5MshWfBq6eHTYr94+J+eitwFsBZUqRDJIx3f4lwQYrTOg6lqL0o3ZdlWTl0CIJpeaf138Bgvi9hHGLJY7wxpootVmWAgOTtCZb+oLA92Day3u1/h4yhz9RqxmW7GuAO0eO7youtOWzg8XFNxMv8m4n4/lRreY4HKkMYR9uM0U+GJE41ktpdp35m9LrnUnBSYiXq7D/OJI9Uh4k7HjNXvwCY4QiEVblVwXq7ImK7tf6gXCn614odReOapCZxuxKPXLah3v/qZZmRYnRTdqTeenTdsephJDrmGj29DzJXk96BYWSZwqmd+Rih7jto6C5kJuO+qWDvtKpJcpEDp0p8zWQIwvnBZHdqbMzFEr/kIulHPu9vLCJM1XjU0pUwwgWdqqw1+QRikKRJt/IknqPBZGFEPseDlc23Yar+VllU7HCIB7Gyvnd0ZxBB9BLO6BWnJunLnmu6FsVsT4+ERvnOTAUE3Y8UnK676R5PY0zIR6Km4ykUZHzIxw13DA", "device_id": "DJQFoJUAEV", "m.relates_to": { "m.in_reply_to": { "event_id": "$gurWt1gh2_Oaut8p56XLmB2CZIFFFi8KxzvAdfjQO8A" } }, "sender_key": "TIfqtIk7PAcAY1YRcal2NVh4VjlgxXVrzLY9U7RKI1A", "session_id": "614miFrM6tlmvg8ylayZhkWrMwgt28u2c4PfjwMfOYo" }, "event_id": "$feD1waMDYXUuqCXqEc8imAOOAiXpWEiK0EUfoA3O-8k", "origin_server_ts": 1730890780070, "sender": "@filipe:chat.filipesm.eu", "type": "m.room.encrypted", "unsigned": { "age": 4154222, "transaction_id": "m1730890779820.14" }, "room_id": "!wzIvctSysYGDinFtVb:matrix.org" } } ```

Reproduction

  1. Use Cinny (latest) to reply to a threaded reply, and see it sometimes work, sometimes not?

Expected behavior

The reply would be threaded (and visible in other clients like Element, inside the thread)

Platform and versions

1. MacOS and Android
2. Vivali browser
3. Matrix homeserver: Conduwuit
4. Cinny version: 4.2.2

Additional context

No response