Skip to content
Snippets Groups Projects
Unverified Commit a100a5b2 authored by Nicolas Werner's avatar Nicolas Werner Committed by GitHub
Browse files

Merge pull request #1033 from Apurv404/fix-room-alias-issue

Fix room alias issue (#354)
parents 4e5e5d55 9eddee75
No related branches found
No related tags found
No related merge requests found
Pipeline #2936 passed
......@@ -749,6 +749,13 @@ ChatPage::joinRoomVia(const std::string &room_id,
void
ChatPage::createRoom(const mtx::requests::CreateRoom &req)
{
if (req.room_alias_name.find(":") != std::string::npos ||
req.room_alias_name.find("#") != std::string::npos) {
nhlog::net()->warn("Failed to create room: Some characters are not allowed in alias");
emit this->showNotification(tr("Room creation failed: Bad Alias"));
return;
}
http::client()->create_room(
req, [this](const mtx::responses::CreateRoom &res, mtx::http::RequestErr err) {
if (err) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment