From 0830ea7037bbaf96392cad2d14aa1aca43878073 Mon Sep 17 00:00:00 2001 From: Cnly Date: Mon, 22 Jul 2019 22:15:17 +0800 Subject: [PATCH] Comment the validation of defined creation_content fields Signed-off-by: Alex Chen --- clientapi/routing/createroom.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clientapi/routing/createroom.go b/clientapi/routing/createroom.go index 9b66fab69..aa1fdde32 100644 --- a/clientapi/routing/createroom.go +++ b/clientapi/routing/createroom.go @@ -98,6 +98,10 @@ func (r createRoomRequest) Validate() *util.JSONResponse { } } + // Validate creation_content fields defined in the spec by marshalling the + // creation_content map into bytes and then unmarshalling the bytes into + // common.CreateContent. + creationContentBytes, err := json.Marshal(r.CreationContent) if err != nil { return &util.JSONResponse{