@@ -61,7 +61,7 @@ class RoomBatchSendEventRestServlet(RestServlet):
61
61
some messages, you can only insert older ones after that.
62
62
tldr; Insert chunks from your most recent history -> oldest history.
63
63
64
- POST /_matrix/client/unstable/org.matrix.msc2716/rooms/<roomID>/batch_send?prev_event =<eventID>&chunk_id=<chunkID>
64
+ POST /_matrix/client/unstable/org.matrix.msc2716/rooms/<roomID>/batch_send?prev_event_id =<eventID>&chunk_id=<chunkID>
65
65
{
66
66
"events": [ ... ],
67
67
"state_events_at_start": [ ... ]
@@ -188,24 +188,24 @@ async def on_POST(
188
188
assert_params_in_dict (body , ["state_events_at_start" , "events" ])
189
189
190
190
assert request .args is not None
191
- prev_events_from_query = parse_strings_from_args (request .args , "prev_event " )
191
+ prev_event_ids_from_query = parse_strings_from_args (request .args , "prev_event_id " )
192
192
chunk_id_from_query = parse_string (request , "chunk_id" )
193
193
194
- if prev_events_from_query is None :
194
+ if prev_event_ids_from_query is None :
195
195
raise SynapseError (
196
196
HTTPStatus .BAD_REQUEST ,
197
197
"prev_event query parameter is required when inserting historical messages back in time" ,
198
198
errcode = Codes .MISSING_PARAM ,
199
199
)
200
200
201
- # For the event we are inserting next to (`prev_events_from_query `),
201
+ # For the event we are inserting next to (`prev_event_ids_from_query `),
202
202
# find the most recent auth events (derived from state events) that
203
203
# allowed that message to be sent. We will use that as a base
204
204
# to auth our historical messages against.
205
205
(
206
206
most_recent_prev_event_id ,
207
207
_ ,
208
- ) = await self .store .get_max_depth_of (prev_events_from_query )
208
+ ) = await self .store .get_max_depth_of (prev_event_ids_from_query )
209
209
# mapping from (type, state_key) -> state_event_id
210
210
prev_state_map = await self .state_store .get_state_ids_for_event (
211
211
most_recent_prev_event_id
@@ -286,7 +286,7 @@ async def on_POST(
286
286
events_to_create = body ["events" ]
287
287
288
288
inherited_depth = await self ._inherit_depth_from_prev_ids (
289
- prev_events_from_query
289
+ prev_event_ids_from_query
290
290
)
291
291
292
292
# Figure out which chunk to connect to. If they passed in
@@ -321,7 +321,7 @@ async def on_POST(
321
321
# an insertion event), in which case we just create a new insertion event
322
322
# that can then get pointed to by a "marker" event later.
323
323
else :
324
- prev_event_ids = prev_events_from_query
324
+ prev_event_ids = prev_event_ids_from_query
325
325
326
326
base_insertion_event_dict = self ._create_insertion_event_dict (
327
327
sender = requester .user .to_string (),
0 commit comments