Skip to content

Commit

Permalink
Also test over federation
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Feb 16, 2024
1 parent 4540e0f commit f10e44e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/csapi/thread_notifications_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,14 @@ func TestThreadedReceipts(t *testing.T) {
// Servers should always prefer the unthreaded receipt when there is a clash of receipts
func TestThreadReceiptsInSyncMSC4102(t *testing.T) {
runtime.SkipIf(t, runtime.Dendrite) // not supported
deployment := complement.Deploy(t, 1)
deployment := complement.Deploy(t, 2)
defer deployment.Destroy(t)

// Create a room with alice and bob.
alice := deployment.Register(t, "hs1", helpers.RegistrationOpts{})
bob := deployment.Register(t, "hs2", helpers.RegistrationOpts{})
roomID := alice.MustCreateRoom(t, map[string]interface{}{"preset": "public_chat"})
bob.MustJoinRoom(t, roomID, []string{"hs1"})
eventA := alice.SendEventSynced(t, roomID, b.Event{
Type: "m.room.message",
Content: map[string]interface{}{
Expand Down Expand Up @@ -341,4 +343,12 @@ func TestThreadReceiptsInSyncMSC4102(t *testing.T) {
syncHasUnthreadedReadReceipt(roomID, alice.UserID, eventB),
)

// bob over federation must also see the same result, to show that the receipt EDUs over
// federation are bundled correctly, or are sent as separate EDUs.
bob.MustSyncUntil(
t,
client.SyncReq{},
syncHasUnthreadedReadReceipt(roomID, alice.UserID, eventB),
)

}

0 comments on commit f10e44e

Please sign in to comment.