diff --git a/server/src/client/command_handler/channel.cpp b/server/src/client/command_handler/channel.cpp index 57e5d99..18cc3b2 100644 --- a/server/src/client/command_handler/channel.cpp +++ b/server/src/client/command_handler/channel.cpp @@ -672,7 +672,9 @@ command_result ConnectedClient::handleCommandChannelCreate(Command &cmd) { test_permission(true, permission::b_channel_create_with_sortorder); } else if (key == "channel_flag_default") { - test_permission(true, permission::b_channel_create_with_default); + if(cmd["channel_flag_default"].as()) { + test_permission(true, permission::b_channel_create_with_default); + } } else if (key == "channel_name" ||key == "channel_name_phonetic") { /* channel create requires a name */ } else if (key == "channel_topic") { @@ -1039,7 +1041,9 @@ command_result ConnectedClient::handleCommandChannelEdit(Command &cmd) { } else if (key == "channel_order") { ACTION_REQUIRES_PERMISSION(permission::b_channel_modify_sortorder, 1, channel_id); } else if (key == "channel_flag_default") { - ACTION_REQUIRES_GLOBAL_PERMISSION(permission::b_channel_modify_make_default, 1); + if(cmd["channel_flag_default"].as()) { + ACTION_REQUIRES_GLOBAL_PERMISSION(permission::b_channel_modify_make_default, 1); + } } else if (key == "channel_name") { ACTION_REQUIRES_PERMISSION(permission::b_channel_modify_name, 1, channel_id); } else if (key == "channel_name_phonetic") {