This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Thread bundled relationships can return a split-brained latest_event #12270
Comments
The relations API correctly returns the expected data here {
"chunk": [
{
"content": {
"body": "testfoobar1",
"format": "org.matrix.custom.html",
"formatted_body": "testfoobar1",
"msgtype": "m.text",
"org.matrix.msc1767.message": [
{
"body": "testfoobar1",
"mimetype": "text/plain"
},
{
"body": "testfoobar1",
"mimetype": "text/html"
}
],
"m.relates_to": {
"event_id": "$2fQ-tX_N6eXHllDPHN3gYD_2ghfbZkGfjvjQdUqxtFQ",
"is_falling_back": true,
"m.in_reply_to": {
"event_id": "$6WWJ7Hga3ZtlTehlThl-v2_doVAFs5EaqgCoffLM9gc"
},
"rel_type": "m.thread"
}
},
"origin_server_ts": 1648024628463,
"room_id": "!cCpRBTFuXwPmOCUFRL:matrix.org",
"sender": "@webdevguru_test31:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 5181292,
"m.relations": {
"m.replace": {
"event_id": "$S8TYTeiuN7aztAIOvVRRq-yE5bi36XmXJ1cZD2MQaAw",
"origin_server_ts": 1648028879518,
"sender": "@webdevguru_test31:matrix.org"
}
}
},
"event_id": "$e8ENHc50vigxQU3NgeZ6I5A68dL1IGqouonJb500jpk",
"user_id": "@webdevguru_test31:matrix.org",
"age": 5181292
},
{
"content": {
"body": "578",
"format": "org.matrix.custom.html",
"formatted_body": "578",
"msgtype": "m.text",
"org.matrix.msc1767.message": [
{
"body": "578",
"mimetype": "text/plain"
},
{
"body": "578",
"mimetype": "text/html"
}
],
"m.relates_to": {
"event_id": "$2fQ-tX_N6eXHllDPHN3gYD_2ghfbZkGfjvjQdUqxtFQ",
"is_falling_back": true,
"m.in_reply_to": {
"event_id": "$0t3DFsi2AcLsaNoOWmABioDQfRviL_lX2jEMK3jV1vI"
},
"rel_type": "m.thread"
}
},
"origin_server_ts": 1648024407578,
"room_id": "!cCpRBTFuXwPmOCUFRL:matrix.org",
"sender": "@webdevguru_test31:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 5402177,
"m.relations": {
"m.replace": {
"event_id": "$zE3_wtcVjdVBzBRVycEBWu5MvuyuOM8P7MmA1C8WFEs",
"origin_server_ts": 1648024533680,
"sender": "@webdevguru_test31:matrix.org"
}
}
},
"event_id": "$6WWJ7Hga3ZtlTehlThl-v2_doVAFs5EaqgCoffLM9gc",
"user_id": "@webdevguru_test31:matrix.org",
"age": 5402177
},
{
"content": {
"body": "45",
"format": "org.matrix.custom.html",
"formatted_body": "45",
"msgtype": "m.text",
"org.matrix.msc1767.message": [
{
"body": "45",
"mimetype": "text/plain"
},
{
"body": "45",
"mimetype": "text/html"
}
],
"m.relates_to": {
"event_id": "$2fQ-tX_N6eXHllDPHN3gYD_2ghfbZkGfjvjQdUqxtFQ",
"is_falling_back": true,
"m.in_reply_to": {
"event_id": "$fMyeT873xDGthUi_muAtmyb7retSUsjE8C6hXTT-dKY"
},
"rel_type": "m.thread"
}
},
"origin_server_ts": 1648024169964,
"room_id": "!cCpRBTFuXwPmOCUFRL:matrix.org",
"sender": "@webdevguru_test31:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 5639791,
"m.relations": {
"m.replace": {
"event_id": "$12Rnowgxo2Nq6LU8osif1c6efs142nSH2jTB-63q46w",
"origin_server_ts": 1648024171546,
"sender": "@webdevguru_test31:matrix.org"
}
}
},
"event_id": "$0t3DFsi2AcLsaNoOWmABioDQfRviL_lX2jEMK3jV1vI",
"user_id": "@webdevguru_test31:matrix.org",
"age": 5639791
},
{
"content": {
"body": "123",
"m.relates_to": {
"event_id": "$2fQ-tX_N6eXHllDPHN3gYD_2ghfbZkGfjvjQdUqxtFQ",
"is_falling_back": true,
"m.in_reply_to": {
"event_id": "$x_AcYE4IMA7ecOO2Ewqn-PtsDeNZzEM02ZiMyat1IpI"
},
"rel_type": "m.thread"
},
"msgtype": "m.text",
"org.matrix.msc1767.text": "123"
},
"origin_server_ts": 1648024168073,
"room_id": "!cCpRBTFuXwPmOCUFRL:matrix.org",
"sender": "@webdevguru_test31:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 5641682
},
"event_id": "$fMyeT873xDGthUi_muAtmyb7retSUsjE8C6hXTT-dKY",
"user_id": "@webdevguru_test31:matrix.org",
"age": 5641682
},
{
"content": {
"body": "1234",
"format": "org.matrix.custom.html",
"formatted_body": "1234",
"msgtype": "m.text",
"org.matrix.msc1767.message": [
{
"body": "1234",
"mimetype": "text/plain"
},
{
"body": "1234",
"mimetype": "text/html"
}
],
"m.relates_to": {
"event_id": "$2fQ-tX_N6eXHllDPHN3gYD_2ghfbZkGfjvjQdUqxtFQ",
"is_falling_back": true,
"m.in_reply_to": {
"event_id": "$UCY9RizsSWxNJxiWKJrvZ-V0PC6RA0ecHc31rNRoeTU"
},
"rel_type": "m.thread"
}
},
"origin_server_ts": 1648022929064,
"room_id": "!cCpRBTFuXwPmOCUFRL:matrix.org",
"sender": "@webdevguru_test31:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 6880691,
"m.relations": {
"m.replace": {
"event_id": "$hE9X0x0kBFmjP1dTBk0ltFQ-wer4RXt4x2smE4QUw0E",
"origin_server_ts": 1648022972081,
"sender": "@webdevguru_test31:matrix.org"
}
}
},
"event_id": "$x_AcYE4IMA7ecOO2Ewqn-PtsDeNZzEM02ZiMyat1IpI",
"user_id": "@webdevguru_test31:matrix.org",
"age": 6880691
}
],
"next_batch": "t62-2793387561_0_0_0_0_0_0_0_0",
"original_event": {
"content": {
"body": "root",
"msgtype": "m.text",
"org.matrix.msc1767.text": "root"
},
"origin_server_ts": 1647960269875,
"room_id": "!cCpRBTFuXwPmOCUFRL:matrix.org",
"sender": "@webdevguru_test31:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 69539880
},
"event_id": "$2fQ-tX_N6eXHllDPHN3gYD_2ghfbZkGfjvjQdUqxtFQ",
"user_id": "@webdevguru_test31:matrix.org",
"age": 69539880
}
} |
We don't bundle any relations for the latest event, we should be able to inject that the edit occurred though. |
clokep
added
the
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
label
Mar 23, 2022
clokep
added
A-Threads
Threaded messages
S-Minor
Blocks non-critical functionality, workarounds exist.
labels
Mar 23, 2022
#12273 should fix this so that all bundled aggregations are included in the latest threaded event. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
The latest_event returned in an
m.thread
bundled relationship can be split-brained if it was edited, the content got updated but them.replace
relation is not signalled in any way, which means clients now have to manually fetch the relations on the latest_event to check whether it was edited or not./event/
call on the thread rootawait mxMatrixClientPeg.matrixClient.fetchRoomEvent("!cCpRBTFuXwPmOCUFRL:matrix.org", "$2fQ-tX_N6eXHllDPHN3gYD_2ghfbZkGfjvjQdUqxtFQ")
/event/
call on the latest event in the threadawait mxMatrixClientPeg.matrixClient.fetchRoomEvent("!cCpRBTFuXwPmOCUFRL:matrix.org", "$e8ENHc50vigxQU3NgeZ6I5A68dL1IGqouonJb500jpk")
Observe the event ID and content are the same, but the latter includes the
m.replace
relation which should be sanely returned in the first request also.Steps to reproduce
I would have expected latest_event to either be entirely unedited or edited with the relation.
Version information
matrix.org
The text was updated successfully, but these errors were encountered: