-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Threaded replies not working every time #2047
Comments
This seems to be related to the |
Does this only happens in encrypted room? |
I can double check! I just opened a non-encrypted room (same accounts as the original example) and everything worked every time, so I couldn't reproduce. I just discovered the "root" of the problem I think: when I open a thread on Element from my account, and then reply to that, it fails. If another account opens the thread initially, everything seems to work. The above rule does not apply for non-e2ee rooms. Threads seems to work every time in non-e2ee rooms, like you suspected @ajbura EDIT with more info: Thread started from other account (on Element) that works
{
"<== DECRYPTED_EVENT ==>": {
"content": {
"msgtype": "m.text",
"body": "Thread",
"m.mentions": {},
"m.relates_to": {
"rel_type": "m.thread",
"event_id": "$vdm35VGHVsH1YiRPNRinyeVaMmpEVaeQUf4t-SuGhAQ",
"is_falling_back": true,
"m.in_reply_to": {
"event_id": "$vdm35VGHVsH1YiRPNRinyeVaMmpEVaeQUf4t-SuGhAQ"
}
}
},
"event_id": "$-vvPR5ZXWG9CxixgPLcaPUJE4Qwk9Hcg_fWAybnqaXo",
"origin_server_ts": 1734075300664,
"sender": "@filipesm.eu:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 266
},
"room_id": "!B34AEQHk5nDImeth78:chat.filipesm.eu"
},
"<== ORIGINAL_EVENT ==>": {
"content": {
"algorithm": "m.megolm.v1.aes-sha2",
"ciphertext": "AwgBEtAC9Cevl8qGR6LYlFmvr1ZeoyFXcKaVLTRd6rP9WMllOsbRHYjvafcpjG5MTnuHlCNqol3r/no8idCRJknuQDTNtZKBid7d6xcPMw7mrwQkfKeKcIShNMmKJedzXgwxQUD1DIkaLEByjmrBb1LIFf1lKfEq/6Oi7Ix3jxvkEyY69lfK7mZWbYvofJl9FlJC11oscvF7KPmC5x9yzPAO5uiqr/dMu+j/A6qFtRVs6BskQ63IYhx491KYUvBsbcznqWejz2HP20EjxF3NY4znn/aID1NA06+8EhnOqiSA0lsn/UVAHdZkFF1USrWciMjySs8D1LQS4WcT3NI5CyY8DH/9ObTSqcPmhEVTJLGo0plJMVq+wgbit0dlQqFe6wtM5piTDmlivRqPPgA9BpPeTzl5Q/0GsV1RaYcaiYHa1iVo2nGwDk3h4B2g/ewSEU9Cr2OmMQEnTAxbwNgWuht7Scz9MHmU1K6vJE/d8ubcsr/Q7+fuKnC9qqS/LhYeGOi56/srPurjTmeHqJT443qo38Nj8vHl4bXfAYEK",
"device_id": "IBQOUKQBMI",
"m.relates_to": {
"event_id": "$vdm35VGHVsH1YiRPNRinyeVaMmpEVaeQUf4t-SuGhAQ",
"is_falling_back": true,
"m.in_reply_to": {
"event_id": "$vdm35VGHVsH1YiRPNRinyeVaMmpEVaeQUf4t-SuGhAQ"
},
"rel_type": "m.thread"
},
"sender_key": "nMUOOZwc+lvvais/rEEThh7c1/PSmK5cuXnD8YrZUyI",
"session_id": "n4zEJ4g577ogeSmgdcdSOk2Uv3HTGxjovMprq4hau5o"
},
"event_id": "$-vvPR5ZXWG9CxixgPLcaPUJE4Qwk9Hcg_fWAybnqaXo",
"origin_server_ts": 1734075300664,
"sender": "@filipesm.eu:matrix.org",
"type": "m.room.encrypted",
"unsigned": {
"age": 266
},
"room_id": "!B34AEQHk5nDImeth78:chat.filipesm.eu"
}
} Thread started on Element from my account, that doesn't work
{
"<== DECRYPTED_EVENT ==>": {
"content": {
"msgtype": "m.text",
"body": "Hey",
"m.relates_to": {
"event_id": "$0fu41UBlrYFNTfVDjsuLq1S0bTYAch14e-Vgy_rhmqM",
"is_falling_back": true,
"m.in_reply_to": {
"event_id": "$0fu41UBlrYFNTfVDjsuLq1S0bTYAch14e-Vgy_rhmqM"
},
"rel_type": "m.thread"
}
},
"event_id": "$Hc37EQlH4y-DTLJ9ljY2ijQVMFO0Yn2qco69F1ciFDw",
"origin_server_ts": 1734075397265,
"sender": "@filipe:chat.filipesm.eu",
"type": "m.room.message",
"unsigned": {
"age": 186,
"transaction_id": "$local.f4acd129-cee8-456f-8a59-9aa9dead5c16"
},
"room_id": "!B34AEQHk5nDImeth78:chat.filipesm.eu"
},
"<== ORIGINAL_EVENT ==>": {
"content": {
"algorithm": "m.megolm.v1.aes-sha2",
"ciphertext": "AwgBEoAB/v5/qKw3QCKdDBunkusJUq+4/YhfvKjy7cy4ZOvHv8E1ecimFY8pL/MokTJs1AiumDxrCYQ+UznhRsU4DMgxES+obJDud5DR6BA3s8qpME3pRaimBn8cUVHThJ61b6UBUTWjGFEA1cj/WvBcxa275yFwsR7EySKF5DX+3Y4LFZy44BA+I6bCNJLkdNZt5p5VUuwDETA3A04vDQS4CaVUlvWwTf7Dp0TybjvN9F7+Camnyh6ulnij7q/CHh21Ud/My/cBd1fb/QQ",
"device_id": "YcNk27rQX9",
"m.relates_to": {
"event_id": "$0fu41UBlrYFNTfVDjsuLq1S0bTYAch14e-Vgy_rhmqM",
"is_falling_back": true,
"m.in_reply_to": {
"event_id": "$0fu41UBlrYFNTfVDjsuLq1S0bTYAch14e-Vgy_rhmqM"
},
"rel_type": "m.thread"
},
"sender_key": "GMFxPV+C23ezUBi2osSub13xlm29z6ls5c4nOJbsgBQ",
"session_id": "pnPgCrJw+yscoY3gMALSoJD12Hct5JPNE1yxSbDv5Gs"
},
"event_id": "$Hc37EQlH4y-DTLJ9ljY2ijQVMFO0Yn2qco69F1ciFDw",
"origin_server_ts": 1734075397265,
"sender": "@filipe:chat.filipesm.eu",
"type": "m.room.encrypted",
"unsigned": {
"age": 186,
"transaction_id": "$local.f4acd129-cee8-456f-8a59-9aa9dead5c16"
},
"room_id": "!B34AEQHk5nDImeth78:chat.filipesm.eu"
}
} The only different between the two seems to be the |
looks like for some unknown reason cinny/src/app/features/room/RoomTimeline.tsx Line 901 in 00d5553
we could try using |
Indeed we could, but it's still weird that for some reason it's not getting it right now, right? Like you very nicely pointed out, the reply draft (when typing the message after clicking the reply button) is not threaded at any point. It never recognises it's inside a thread, but it should. I don't know if using |
Another thing to point out is that the failed threaded reply (below) still responds to the threaded message, just doesn't "stay threaded". Failed threaded reply
{
"<== DECRYPTED_EVENT ==>": {
"content": {
"msgtype": "m.text",
"body": "> <@filipe:chat.filipesm.eu> Hey\n\nHey?",
"format": "org.matrix.custom.html",
"formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!B34AEQHk5nDImeth78%3Achat.filipesm.eu/%24Hc37EQlH4y-DTLJ9ljY2ijQVMFO0Yn2qco69F1ciFDw\">In reply to</a><a href=\"https://matrix.to/#/%40filipe%3Achat.filipesm.eu\">@filipe:chat.filipesm.eu</a><br />Hey</blockquote></mx-reply>Hey?",
"m.relates_to": {
"m.in_reply_to": {
"event_id": "$Hc37EQlH4y-DTLJ9ljY2ijQVMFO0Yn2qco69F1ciFDw"
}
}
},
"event_id": "$dRlckBOydutixc2bFMj5W91Rx2fd88OSs9NvpaDhjp0",
"origin_server_ts": 1734075402255,
"sender": "@filipe:chat.filipesm.eu",
"type": "m.room.message",
"unsigned": {
"age": 123,
"transaction_id": "m1734075402034.14"
},
"room_id": "!B34AEQHk5nDImeth78:chat.filipesm.eu"
},
"<== ORIGINAL_EVENT ==>": {
"content": {
"algorithm": "m.megolm.v1.aes-sha2",
"ciphertext": "AwgGEvADOpH41w1zHfgISY8RgRppHjPseqx19XrYqdmLBJGUpxkTu+ByqaDWnNfw6ncsdkCMZMyyRoFgbfiXtyKpV+WYlqjRevbcsACoepvTKraCcKxMaU/off5hFzi0pRoWgH0BvbP8LzbsoPnQ23sslyQoZYrxcrdje0zsP0FE4UwV+9wHk1wMSitPWfN7UulWRIvfDzMRU7iA43r6fox8XgJH159QGqoiy6eweKQD0ZvFiQFd6TL9ZJD2yRQRXERi9RpinW3gUZ5G6B1BDwxtjAujFiP3Xg5gNjLsFyDxs5UI2JGto58OzoVQk1iq+efJ2fLBktYBnUuSG7qvun+QxOvHq01YhI8hl1JBq3jfDBPR1KJ4JOJZyut3cn/V+pi8v1ES7SPvdLkVsLxKhBBGWHLHySKRq9H+eAvpsQiSqVE5CHBteO3wane4g55F8TrGn8MGtIWdLSTYDUZqxCgRgFMAbReJLr8YGN4dsd/e61bJy9MraFRlVxSJb0TMpy7YwT5ExDCwc1LA8y43jnMY04m7qpO+OrtjHuWkmnPfnfa4hHUtijYDTdZtXQJJSDneIz7TjZiJ7mQwXk+kkvC8k+TfhO2A13+Qq7ieX6fOScZ56hlYXnE4ULt/AapIGPViGfyKHnXqJflsuz9BJK0DDDTF5z9XyIdS0n5ZRFXRA7oRDHaWqM5n/HopMN0HzAdEnDwMfvbZ5AwKiPNPtJFjEoRqpGSPwJt0OUrFt7o22OVlJzrIedkUuFkCBQ",
"device_id": "DJQFoJUAEV",
"m.relates_to": {
"m.in_reply_to": {
"event_id": "$Hc37EQlH4y-DTLJ9ljY2ijQVMFO0Yn2qco69F1ciFDw"
}
},
"sender_key": "TIfqtIk7PAcAY1YRcal2NVh4VjlgxXVrzLY9U7RKI1A",
"session_id": "wMiYidJTohxUwhUC/yvDEicCZIU7XHPCNuaMM6ODgmo"
},
"event_id": "$dRlckBOydutixc2bFMj5W91Rx2fd88OSs9NvpaDhjp0",
"origin_server_ts": 1734075402255,
"sender": "@filipe:chat.filipesm.eu",
"type": "m.room.encrypted",
"unsigned": {
"age": 123,
"transaction_id": "m1734075402034.14"
},
"room_id": "!B34AEQHk5nDImeth78:chat.filipesm.eu"
}
} |
https://github.com/matrix-org/matrix-js-sdk/blob/315e81b7decd67154eaedfbaf4cf3fbecbb99e7f/src/models/event.ts#L562 |
Do you want help testing? Or want me to submit a bug upstream? :) |
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.
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).
Screen.Recording.2024-11-06.at.13.35.35.mov
I will also post the sources for these three messages (the original, the first threaded reply, and the "failed" threaded reply).
The sources
Initial messageSuccessful threaded reply
"Failed" threaded reply
Reproduction
Expected behavior
The reply would be threaded (and visible in other clients like Element, inside the thread)
Platform and versions
Additional context
No response
The text was updated successfully, but these errors were encountered: