In this post I'm recording how I implement creating Spaces via NeoChat.
Creating the UI front was rather easy, since I used the same dialog as that for creating room. We could have both room and space creation in same dialog because of how similarly they're represented in Matrix. (Space is just room with one extra event)
On the functionality side, I had to set the
m.room.type key to
m.space upon creating the room. This was done by setting
creationContent JSON value to the same.