Skip to content

Commit

Permalink
Allow subsequent joiners to be able to see the message history
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods committed Jul 10, 2021
1 parent 9c68cb5 commit 1f780ec
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions tests/msc2716_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ func TestBackfillingHistory(t *testing.T) {
t.Run("Backfilled historical events from multiple users in the same chunk", func(t *testing.T) {
t.Parallel()

roomID := as.CreateRoom(t, struct{}{})
roomID := as.CreateRoom(t, map[string]interface{}{
"preset": "public_chat",
"name": "the hangout spot",
})
alice.JoinRoom(t, roomID, nil)

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

roomID := as.CreateRoom(t, struct{}{})
roomID := as.CreateRoom(t, map[string]interface{}{
"preset": "public_chat",
"name": "the hangout spot",
})
alice.JoinRoom(t, roomID, nil)

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

roomID := as.CreateRoom(t, struct{}{})
roomID := as.CreateRoom(t, map[string]interface{}{
"preset": "public_chat",
"name": "the hangout spot",
})

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

roomID := as.CreateRoom(t, struct{}{})
roomID := as.CreateRoom(t, map[string]interface{}{
"preset": "public_chat",
"name": "the hangout spot",
})
alice.JoinRoom(t, roomID, nil)

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

roomID := as.CreateRoom(t, struct{}{})
roomID := as.CreateRoom(t, map[string]interface{}{
"preset": "public_chat",
"name": "the hangout spot",
})
alice.JoinRoom(t, roomID, nil)

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

roomID := as.CreateRoom(t, struct{}{})
roomID := as.CreateRoom(t, map[string]interface{}{
"preset": "public_chat",
"name": "the hangout spot",
})
alice.JoinRoom(t, roomID, nil)

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

roomID := as.CreateRoom(t, struct{}{})
roomID := as.CreateRoom(t, map[string]interface{}{
"preset": "public_chat",
"name": "the hangout spot",
})
alice.JoinRoom(t, roomID, nil)

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

0 comments on commit 1f780ec

Please sign in to comment.