api: Fix encoding of strings in streams endpoint.

* Remove unnecessary json_validator for string parameters.
* Update frontend to pass right parameter.

Bump api feature level and highlight the fix for `emojiset`
parameter of `settings/display` endpoint in zulip.yaml file.

Fixes part of #18035.
This commit is contained in:
Gaurav Pandey
2021-05-08 22:11:54 +05:30
committed by Tim Abbott
parent 9abe1cafbe
commit 96e035a2f0
6 changed files with 62 additions and 72 deletions

View File

@@ -652,7 +652,7 @@ export function change_stream_name(e) {
channel.patch({
// Stream names might contain unsafe characters so we must encode it first.
url: "/json/streams/" + stream_id,
data: {new_name: JSON.stringify(new_name)},
data: {new_name},
success() {
new_name_box.val("");
ui_report.success(
@@ -705,7 +705,7 @@ export function change_stream_description(e) {
// Description might contain unsafe characters so we must encode it first.
url: "/json/streams/" + stream_id,
data: {
description: JSON.stringify(description),
description,
},
success() {
// The event from the server will update the rest of the UI