Allow creating spaces
This commit is contained in:
parent
c6bf1e6508
commit
1d7575036e
7 changed files with 55 additions and 14 deletions
|
|
@ -136,10 +136,22 @@ Nheko::setTransientParent(QWindow *window, QWindow *parentWindow) const
|
|||
}
|
||||
|
||||
void
|
||||
Nheko::createRoom(QString name, QString topic, QString aliasLocalpart, bool isEncrypted, int preset)
|
||||
Nheko::createRoom(bool space,
|
||||
QString name,
|
||||
QString topic,
|
||||
QString aliasLocalpart,
|
||||
bool isEncrypted,
|
||||
int preset)
|
||||
{
|
||||
mtx::requests::CreateRoom req;
|
||||
|
||||
if (space) {
|
||||
req.creation_content = mtx::events::state::Create{};
|
||||
req.creation_content->type = mtx::events::state::room_type::space;
|
||||
req.creation_content->creator.clear();
|
||||
req.creation_content->room_version.clear();
|
||||
}
|
||||
|
||||
switch (preset) {
|
||||
case 1:
|
||||
req.preset = mtx::requests::Preset::PublicChat;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue