Change room type from "Discussion" to "Private Group"

I’m wondering if it’s possible to “convert” a room from discussion to private group?

When using REST API to get room information, I can see that room type is p for both discussion and private group. The only difference being that a discussion have an attribute prid (I guess for Parent Room ID) that the private group doesn’t have.

So I was guessing that maybe dropping this prid information from database my do what I want. But honestly I was looking first to something that is less of an hack such as using API to update room settings (but didn’t find any API covering such use case).

Any help would greatly appreciated.

I manage to transform a room from “Discussion” to “Private Group” by doing the following:

  • Rung MongoDB shell
  • Select Rocket.Chat database: use rocketchat
  • Get a list of “Discussion” rooms: db.rocketchat_room.find({"prid":{ $exists: true }}).pretty()
  • Remove prid attribute of a “Discussion” room (adjust the _id value): db.rocketchat_room.update({"_id" : "abZrsHnfpAfNp8h9hR"}, {$unset: {prid : "" }})
  • This is it for the server side

In order to refresh the view on the client side currently the only solution I found is for the user to leave the “Discussion” and then be added back to the “Private Group”.