inline_topic_edit: Allow empty string as a valid topic name.

Earlier, using empty string as topic name during inline topic edit
resulted in noop. It was processed as topic NOT changed.

Since empty string is a valid topic name now, this commit makes
changes to NOT process it as topic not changed.
This commit is contained in:
Prakhar Pratyush
2025-01-13 12:00:39 +05:30
committed by Tim Abbott
parent fdd0a5ba2c
commit 6252e3b3cf

View File

@@ -965,7 +965,7 @@ export function try_save_inline_topic_edit($row: JQuery): void {
const old_topic = message.topic;
const new_topic = $row.find<HTMLInputElement>("input.inline_topic_edit").val()?.trim();
assert(new_topic !== undefined);
const topic_changed = new_topic !== old_topic && new_topic !== "";
const topic_changed = new_topic !== old_topic;
if (!topic_changed) {
// this means the inline_topic_edit was opened and submitted without