Skip to content

Commit 77559bf

Browse files
committed
Marker events should have unique state_key so they all show up in the current state to process
See matrix-org/synapse#12718 (comment)
1 parent 3b3d383 commit 77559bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/msc2716_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,8 +1435,10 @@ func sendMarkerAndEnsureBackfilled(t *testing.T, as *client.CSAPI, c *client.CSA
14351435
markerInsertionContentField: insertionEventID,
14361436
},
14371437
}
1438-
// We can't use as.SendEventSynced(...) because application services can't use the /sync API
1439-
markerSendRes := as.MustDoFunc(t, "PUT", []string{"_matrix", "client", "r0", "rooms", roomID, "state", markerEvent.Type}, client.WithJSONBody(t, markerEvent.Content))
1438+
// Marker events should have unique state_key so they all show up in the current state to process.
1439+
unique_state_key := getTxnID("marker_state_key")
1440+
// We can't use as.SendEventSynced(...) because application services can't use the /sync API.
1441+
markerSendRes := as.MustDoFunc(t, "PUT", []string{"_matrix", "client", "r0", "rooms", roomID, "state", markerEvent.Type, unique_state_key}, client.WithJSONBody(t, markerEvent.Content))
14401442
markerSendBody := client.ParseJSON(t, markerSendRes)
14411443
markerEventID = client.GetJSONFieldStr(t, markerSendBody, "event_id")
14421444

0 commit comments

Comments
 (0)