Mark rooms as direct chats

Either by accepting an invite or manually using /converttodm and revert
with /converttoroom.
This commit is contained in:
Nicolas Werner 2021-11-21 05:23:38 +01:00
parent 4dc5b647c6
commit 3d92e8ae60
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
5 changed files with 79 additions and 2 deletions

View file

@ -645,6 +645,11 @@ InputBar::command(QString command, QString args)
return;
}
nhlog::net()->error("Could not resolve goto: {}", args.toStdString());
} else if (command == "converttodm") {
utils::markRoomAsDirect(this->room->roomId(),
cache::getMembers(this->room->roomId().toStdString(), 0, -1));
} else if (command == "converttoroom") {
utils::removeDirectFromRoom(this->room->roomId());
}
}