Skip to content

Commit 1f780ec

Browse files
committed
Allow subsequent joiners to be able to see the message history
1 parent 9c68cb5 commit 1f780ec

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

tests/msc2716_test.go

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ func TestBackfillingHistory(t *testing.T) {
189189
t.Run("Backfilled historical events from multiple users in the same chunk", func(t *testing.T) {
190190
t.Parallel()
191191

192-
roomID := as.CreateRoom(t, struct{}{})
192+
roomID := as.CreateRoom(t, map[string]interface{}{
193+
"preset": "public_chat",
194+
"name": "the hangout spot",
195+
})
193196
alice.JoinRoom(t, roomID, nil)
194197

195198
// Create the "live" event we are going to insert our backfilled events next to
@@ -236,7 +239,10 @@ func TestBackfillingHistory(t *testing.T) {
236239
t.Run("Backfilled historical events with m.historical do not come down in an incremental sync", func(t *testing.T) {
237240
t.Parallel()
238241

239-
roomID := as.CreateRoom(t, struct{}{})
242+
roomID := as.CreateRoom(t, map[string]interface{}{
243+
"preset": "public_chat",
244+
"name": "the hangout spot",
245+
})
240246
alice.JoinRoom(t, roomID, nil)
241247

242248
// Create the "live" event we are going to insert our backfilled events next to
@@ -283,7 +289,10 @@ func TestBackfillingHistory(t *testing.T) {
283289
t.Run("Unrecognised prev_event ID will throw an error", func(t *testing.T) {
284290
t.Parallel()
285291

286-
roomID := as.CreateRoom(t, struct{}{})
292+
roomID := as.CreateRoom(t, map[string]interface{}{
293+
"preset": "public_chat",
294+
"name": "the hangout spot",
295+
})
287296

288297
batchSendHistoricalMessages(
289298
t,
@@ -305,7 +314,10 @@ func TestBackfillingHistory(t *testing.T) {
305314
t.Run("Normal users aren't allowed to backfill messages", func(t *testing.T) {
306315
t.Parallel()
307316

308-
roomID := as.CreateRoom(t, struct{}{})
317+
roomID := as.CreateRoom(t, map[string]interface{}{
318+
"preset": "public_chat",
319+
"name": "the hangout spot",
320+
})
309321
alice.JoinRoom(t, roomID, nil)
310322

311323
eventIDsBefore := createMessagesInRoom(t, alice, roomID, 1)
@@ -336,7 +348,10 @@ func TestBackfillingHistory(t *testing.T) {
336348
t.Skip("Skipping until federation is implemented")
337349
t.Parallel()
338350

339-
roomID := as.CreateRoom(t, struct{}{})
351+
roomID := as.CreateRoom(t, map[string]interface{}{
352+
"preset": "public_chat",
353+
"name": "the hangout spot",
354+
})
340355
alice.JoinRoom(t, roomID, nil)
341356

342357
eventIDsBefore := createMessagesInRoom(t, alice, roomID, 1)
@@ -382,7 +397,10 @@ func TestBackfillingHistory(t *testing.T) {
382397
t.Skip("Skipping until federation is implemented")
383398
t.Parallel()
384399

385-
roomID := as.CreateRoom(t, struct{}{})
400+
roomID := as.CreateRoom(t, map[string]interface{}{
401+
"preset": "public_chat",
402+
"name": "the hangout spot",
403+
})
386404
alice.JoinRoom(t, roomID, nil)
387405

388406
// Join the room from a remote homeserver before any backfilled messages are sent
@@ -435,7 +453,10 @@ func TestBackfillingHistory(t *testing.T) {
435453
t.Skip("Skipping until federation is implemented")
436454
t.Parallel()
437455

438-
roomID := as.CreateRoom(t, struct{}{})
456+
roomID := as.CreateRoom(t, map[string]interface{}{
457+
"preset": "public_chat",
458+
"name": "the hangout spot",
459+
})
439460
alice.JoinRoom(t, roomID, nil)
440461

441462
// Join the room from a remote homeserver before any backfilled messages are sent

0 commit comments

Comments
 (0)