Skip to content

Commit

Permalink
Marker events should have unique state_key so they all show up in the…
Browse files Browse the repository at this point in the history
… current state to process

See matrix-org/synapse#12718 (comment)
  • Loading branch information
MadLittleMods committed May 19, 2022
1 parent 3b3d383 commit 77559bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/msc2716_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1435,8 +1435,10 @@ func sendMarkerAndEnsureBackfilled(t *testing.T, as *client.CSAPI, c *client.CSA
markerInsertionContentField: insertionEventID,
},
}
// We can't use as.SendEventSynced(...) because application services can't use the /sync API
markerSendRes := as.MustDoFunc(t, "PUT", []string{"_matrix", "client", "r0", "rooms", roomID, "state", markerEvent.Type}, client.WithJSONBody(t, markerEvent.Content))
// Marker events should have unique state_key so they all show up in the current state to process.
unique_state_key := getTxnID("marker_state_key")
// We can't use as.SendEventSynced(...) because application services can't use the /sync API.
markerSendRes := as.MustDoFunc(t, "PUT", []string{"_matrix", "client", "r0", "rooms", roomID, "state", markerEvent.Type, unique_state_key}, client.WithJSONBody(t, markerEvent.Content))
markerSendBody := client.ParseJSON(t, markerSendRes)
markerEventID = client.GetJSONFieldStr(t, markerSendBody, "event_id")

Expand Down

0 comments on commit 77559bf

Please sign in to comment.