Make matrix link chat invites direct chats

This commit is contained in:
Nicolas Werner 2021-01-25 15:59:15 +01:00
parent 6313ecb7d4
commit be49d184be

View file

@ -1314,8 +1314,10 @@ ChatPage::startChat(QString userid)
mtx::requests::CreateRoom req; mtx::requests::CreateRoom req;
req.preset = mtx::requests::Preset::PrivateChat; req.preset = mtx::requests::Preset::PrivateChat;
req.visibility = mtx::common::RoomVisibility::Private; req.visibility = mtx::common::RoomVisibility::Private;
if (utils::localUser() != userid) if (utils::localUser() != userid) {
req.invite = {userid.toStdString()}; req.invite = {userid.toStdString()};
req.is_direct = true;
}
emit ChatPage::instance()->createRoom(req); emit ChatPage::instance()->createRoom(req);
} }