mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 08:12:37 +01:00
modules/federation/invite: Check path parameters match event in body.
This commit is contained in:
parent
60f983b953
commit
c929a39795
1 changed files with 14 additions and 0 deletions
|
@ -69,6 +69,20 @@ put__invite(client &client,
|
|||
request
|
||||
};
|
||||
|
||||
if(at<"event_id"_>(event) != event_id)
|
||||
throw m::error
|
||||
{
|
||||
http::NOT_MODIFIED, "M_MISMATCH_EVENT_ID",
|
||||
"ID of event in request body does not match the path parameter."
|
||||
};
|
||||
|
||||
if(at<"room_id"_>(event) != room_id)
|
||||
throw m::error
|
||||
{
|
||||
http::NOT_MODIFIED, "M_MISMATCH_ROOM_ID",
|
||||
"ID of room in request body does not match the path parameter."
|
||||
};
|
||||
|
||||
check_event(request, event);
|
||||
|
||||
//TODO: eval()
|
||||
|
|
Loading…
Reference in a new issue