@@ -104,7 +104,7 @@ func TestBackfillingHistory(t *testing.T) {
104104			ensureVirtualUserRegistered (t , as , virtualUserLocalpart )
105105
106106			// Insert the most recent chunk of backfilled history 
107- 			backfillRes  :=  batchSendHistoricalMessages (
107+ 			batchSendRes  :=  batchSendHistoricalMessages (
108108				t ,
109109				as ,
110110				[]string {virtualUserID },
@@ -116,13 +116,13 @@ func TestBackfillingHistory(t *testing.T) {
116116				// Status 
117117				200 ,
118118			)
119- 			backfillResBody  :=  client .ParseJSON (t , backfillRes )
120- 			historicalEventIDs  :=  getEventsFromBatchSendResponseBody (t , backfillResBody )
121- 			nextChunkID  :=  getNextChunkIdFromBatchSendResponseBody (t , backfillResBody )
119+ 			batchSendResBody  :=  client .ParseJSON (t , batchSendRes )
120+ 			historicalEventIDs  :=  getEventsFromBatchSendResponseBody (t , batchSendResBody )
121+ 			nextChunkID  :=  getNextChunkIdFromBatchSendResponseBody (t , batchSendResBody )
122122
123123			// Insert another older chunk of backfilled history from the same user. 
124124			// Make sure the meta data and joins still work on the subsequent chunk 
125- 			backfillRes2  :=  batchSendHistoricalMessages (
125+ 			batchSendRes2  :=  batchSendHistoricalMessages (
126126				t ,
127127				as ,
128128				[]string {virtualUserID },
@@ -134,8 +134,8 @@ func TestBackfillingHistory(t *testing.T) {
134134				// Status 
135135				200 ,
136136			)
137- 			backfillResBody2  :=  client .ParseJSON (t , backfillRes2 )
138- 			historicalEventIDs2  :=  getEventsFromBatchSendResponseBody (t , backfillResBody2 )
137+ 			batchSendResBody2  :=  client .ParseJSON (t , batchSendRes2 )
138+ 			historicalEventIDs2  :=  getEventsFromBatchSendResponseBody (t , batchSendResBody2 )
139139
140140			var  expectedEventIDOrder  []string 
141141			expectedEventIDOrder  =  append (expectedEventIDOrder , eventIDsBefore ... )
@@ -201,7 +201,7 @@ func TestBackfillingHistory(t *testing.T) {
201201			// Insert a backfilled event 
202202			virtualUserID2  :=  "@ricky:hs1" 
203203			virtualUserID3  :=  "@carol:hs1" 
204- 			backfillRes  :=  batchSendHistoricalMessages (
204+ 			batchSendRes  :=  batchSendHistoricalMessages (
205205				t ,
206206				as ,
207207				[]string {virtualUserID , virtualUserID2 , virtualUserID3 },
@@ -213,8 +213,8 @@ func TestBackfillingHistory(t *testing.T) {
213213				// Status 
214214				200 ,
215215			)
216- 			backfillResBody  :=  client .ParseJSON (t , backfillRes )
217- 			historicalEventIDs  :=  getEventsFromBatchSendResponseBody (t , backfillResBody )
216+ 			batchSendResBody  :=  client .ParseJSON (t , batchSendRes )
217+ 			historicalEventIDs  :=  getEventsFromBatchSendResponseBody (t , batchSendResBody )
218218
219219			messagesRes  :=  alice .MustDoFunc (t , "GET" , []string {"_matrix" , "client" , "r0" , "rooms" , roomID , "messages" }, client .WithContentType ("application/json" ), client .WithQueries (url.Values {
220220				"dir" :   []string {"b" },
@@ -245,7 +245,7 @@ func TestBackfillingHistory(t *testing.T) {
245245			createMessagesInRoom (t , alice , roomID , 5 )
246246
247247			// Insert a backfilled event 
248- 			backfillRes  :=  batchSendHistoricalMessages (
248+ 			batchSendRes  :=  batchSendHistoricalMessages (
249249				t ,
250250				as ,
251251				[]string {virtualUserID },
@@ -257,8 +257,8 @@ func TestBackfillingHistory(t *testing.T) {
257257				// Status 
258258				200 ,
259259			)
260- 			backfillResBody  :=  client .ParseJSON (t , backfillRes )
261- 			historicalEventIDs  :=  getEventsFromBatchSendResponseBody (t , backfillResBody )
260+ 			batchSendResBody  :=  client .ParseJSON (t , batchSendRes )
261+ 			historicalEventIDs  :=  getEventsFromBatchSendResponseBody (t , batchSendResBody )
262262			backfilledEventId  :=  historicalEventIDs [0 ]
263263
264264			// This is just a dummy event we search for after the backfilledEventId 
@@ -346,7 +346,7 @@ func TestBackfillingHistory(t *testing.T) {
346346			// Register and join the virtual user 
347347			ensureVirtualUserRegistered (t , as , virtualUserLocalpart )
348348
349- 			backfillRes  :=  batchSendHistoricalMessages (
349+ 			batchSendRes  :=  batchSendHistoricalMessages (
350350				t ,
351351				as ,
352352				[]string {virtualUserID },
@@ -358,8 +358,8 @@ func TestBackfillingHistory(t *testing.T) {
358358				// Status 
359359				200 ,
360360			)
361- 			backfillResBody  :=  client .ParseJSON (t , backfillRes )
362- 			historicalEventIDs  :=  getEventsFromBatchSendResponseBody (t , backfillResBody )
361+ 			batchSendResBody  :=  client .ParseJSON (t , batchSendRes )
362+ 			historicalEventIDs  :=  getEventsFromBatchSendResponseBody (t , batchSendResBody )
363363
364364			// Join the room from a remote homeserver after the backfilled messages were sent 
365365			remoteCharlie .JoinRoom (t , roomID , []string {"hs1" })
@@ -405,7 +405,7 @@ func TestBackfillingHistory(t *testing.T) {
405405			// Register and join the virtual user 
406406			ensureVirtualUserRegistered (t , as , virtualUserLocalpart )
407407
408- 			backfillRes  :=  batchSendHistoricalMessages (
408+ 			batchSendRes  :=  batchSendHistoricalMessages (
409409				t ,
410410				as ,
411411				[]string {virtualUserID },
@@ -417,8 +417,8 @@ func TestBackfillingHistory(t *testing.T) {
417417				// Status 
418418				200 ,
419419			)
420- 			backfillResBody  :=  client .ParseJSON (t , backfillRes )
421- 			historicalEventIDs  :=  getEventsFromBatchSendResponseBody (t , backfillResBody )
420+ 			batchSendResBody  :=  client .ParseJSON (t , batchSendRes )
421+ 			historicalEventIDs  :=  getEventsFromBatchSendResponseBody (t , batchSendResBody )
422422
423423			messagesRes  :=  remoteCharlie .MustDoFunc (t , "GET" , []string {"_matrix" , "client" , "r0" , "rooms" , roomID , "messages" }, client .WithContentType ("application/json" ), client .WithQueries (url.Values {
424424				"dir" :   []string {"b" },
@@ -462,7 +462,7 @@ func TestBackfillingHistory(t *testing.T) {
462462			}))
463463
464464			// Historical messages are inserted where we have already scrolled back to 
465- 			backfillRes  :=  batchSendHistoricalMessages (
465+ 			batchSendRes  :=  batchSendHistoricalMessages (
466466				t ,
467467				as ,
468468				[]string {virtualUserID },
@@ -474,8 +474,8 @@ func TestBackfillingHistory(t *testing.T) {
474474				// Status 
475475				200 ,
476476			)
477- 			backfillResBody  :=  client .ParseJSON (t , backfillRes )
478- 			historicalEventIDs  :=  getEventsFromBatchSendResponseBody (t , backfillResBody )
477+ 			batchSendResBody  :=  client .ParseJSON (t , batchSendRes )
478+ 			historicalEventIDs  :=  getEventsFromBatchSendResponseBody (t , batchSendResBody )
479479
480480			messagesRes  :=  remoteCharlie .MustDoFunc (t , "GET" , []string {"_matrix" , "client" , "r0" , "rooms" , roomID , "messages" }, client .WithContentType ("application/json" ), client .WithQueries (url.Values {
481481				"dir" :   []string {"b" },
0 commit comments