Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
test users: Add an escape char to a test username.
Arun Sankar146b32d63aa2
diff --git a/frontend_tests/node_tests/composebox_typeahead.js b/frontend_tests/node_tests/composebox_typeahead.jsindex e49c1993eb0..184f93320ae 100644--- a/frontend_tests/node_tests/composebox_typeahead.js+++ b/frontend_tests/node_tests/composebox_typeahead.js@@ -213,7 +213,7 @@ const othello = {const cordelia = {email: "[email protected]",user_id: 102,- full_name: "Cordelia Lear",+ full_name: "Cordelia, Lear's daughter",};const deactivated_user = {email: "[email protected]",@@ -763,7 +763,7 @@ test("initialize", (override) => {// Adds a `no break-space` at the end. This should fail// if there wasn't any logic replacing `no break-space`// with normal space.- query = "cordelia" + String.fromCharCode(160);+ query = "cordelia, lear's" + String.fromCharCode(160);assert.equal(matcher(query, cordelia), true);assert.equal(matcher(query, othello), false);@@ -783,7 +783,7 @@ test("initialize", (override) => {options.query = "[email protected], cor";actual_value = options.updater(cordelia, event);- assert.equal(appended_name, "Cordelia Lear");+ assert.equal(appended_name, "Cordelia, Lear's daughter");const click_event = {type: "click", target: "#doesnotmatter"};options.query = "othello";@@ -1468,8 +1468,8 @@ test("typeahead_results", () => {assert_emoji_matches("notaemoji", []);// Autocomplete user mentions by user name.assert_mentions_matches("cordelia", [cordelia]);- assert_mentions_matches("cordelia le", [cordelia]);- assert_mentions_matches("cordelia le ", []);+ assert_mentions_matches("cordelia, le", [cordelia]);+ assert_mentions_matches("cordelia, le ", []);assert_mentions_matches("King ", [hamlet, lear]);assert_mentions_matches("King H", [hamlet]);assert_mentions_matches("King L", [lear]);diff --git a/frontend_tests/node_tests/markdown.js b/frontend_tests/node_tests/markdown.jsindex 0cb28fb5ace..ab8535c62f3 100644--- a/frontend_tests/node_tests/markdown.js+++ b/frontend_tests/node_tests/markdown.js@@ -58,7 +58,7 @@ emoji.initialize(emoji_params);fenced_code.initialize(pygments_data);const cordelia = {- full_name: "Cordelia Lear",+ full_name: "Cordelia, Lear's daughter",user_id: 101,email: "[email protected]",};@@ -266,7 +266,7 @@ test("message_flags", () => {assert(!message.mentioned);assert(!message.mentioned_me_directly);- message = {raw_content: "@**Cordelia Lear**"};+ message = {raw_content: "@**Cordelia, Lear's daughter**"};markdown.apply_markdown(message);assert(message.mentioned);assert(message.mentioned_me_directly);@@ -326,9 +326,9 @@ test("marked", () => {expected: "<blockquote>\n<p>quote this for me</p>\n</blockquote>\n<p>thanks</p>",},{- input: "This is a @**CordeLIA Lear** mention",+ input: "This is a @**CordeLIA, Lear's daughter** mention",expected:- '<p>This is a <span class="user-mention" data-user-id="101">@Cordelia Lear</span> mention</p>',+ '<p>This is a <span class="user-mention" data-user-id="101">@Cordelia, Lear's daughter</span> mention</p>',},{input: "These @ @**** are not mentions",@@ -387,15 +387,15 @@ test("marked", () => {'<p><span aria-label="poop" class="emoji emoji-1f4a9" role="img" title="poop">:poop:</span></p>',},{- input: "Silent mention: @_**Cordelia Lear**",+ input: "Silent mention: @_**Cordelia, Lear's daughter**",expected:- '<p>Silent mention: <span class="user-mention silent" data-user-id="101">Cordelia Lear</span></p>',+ '<p>Silent mention: <span class="user-mention silent" data-user-id="101">Cordelia, Lear's daughter</span></p>',},{input:- "> Mention in quote: @**Cordelia Lear**\n\nMention outside quote: @**Cordelia Lear**",+ "> Mention in quote: @**Cordelia, Lear's daughter**\n\nMention outside quote: @**Cordelia, Lear's daughter**",expected:- '<blockquote>\n<p>Mention in quote: <span class="user-mention silent" data-user-id="101">Cordelia Lear</span></p>\n</blockquote>\n<p>Mention outside quote: <span class="user-mention" data-user-id="101">@Cordelia Lear</span></p>',+ '<blockquote>\n<p>Mention in quote: <span class="user-mention silent" data-user-id="101">Cordelia, Lear's daughter</span></p>\n</blockquote>\n<p>Mention outside quote: <span class="user-mention" data-user-id="101">@Cordelia, Lear's daughter</span></p>',},// Test only those linkifiers which don't return True for// `contains_backend_only_syntax()`. Those which return True@@ -422,9 +422,9 @@ test("marked", () => {'<p>T<br>\n<a class="stream" data-stream-id="1" href="/#narrow/stream/1-Denmark">#Denmark</a></p>',},{- input: "T\n@**Cordelia Lear**",+ input: "T\n@**Cordelia, Lear's daughter**",expected:- '<p>T<br>\n<span class="user-mention" data-user-id="101">@Cordelia Lear</span></p>',+ '<p>T<br>\n<span class="user-mention" data-user-id="101">@Cordelia, Lear's daughter</span></p>',},{input: "@**Mark Twin|104** and @**Mark Twin|105** are out to confuse you.",@@ -433,8 +433,8 @@ test("marked", () => {},{input: "@**Invalid User|1234**", expected: "<p>@**Invalid User|1234**</p>"},{- input: "@**Cordelia LeAR|103** has a wrong user_id.",- expected: "<p>@**Cordelia LeAR|103** has a wrong user_id.</p>",+ input: "@**Cordelia, Lear's daughter|103** has a wrong user_id.",+ expected: "<p>@**Cordelia, Lear's daughter|103** has a wrong user_id.</p>",},{input: "@**Brother of Bobby|123** is really the full name.",@@ -642,7 +642,7 @@ test("message_flags", () => {assert.equal(message.is_me_message, true);- input = "testing this @**all** @**Cordelia Lear**";+ input = "testing this @**all** @**Cordelia, Lear's daughter**";message = {topic: "No links here", raw_content: input};markdown.apply_markdown(message);diff --git a/frontend_tests/puppeteer_lib/common.ts b/frontend_tests/puppeteer_lib/common.tsindex 6fc5c1515b3..a13929063a4 100644--- a/frontend_tests/puppeteer_lib/common.ts+++ b/frontend_tests/puppeteer_lib/common.ts@@ -50,7 +50,7 @@ class CommonUtils {};fullname: Record<string, string> = {- cordelia: "Cordelia Lear",+ cordelia: "Cordelia, Lear's daughter",othello: "Othello, the Moor of Venice",hamlet: "King Hamlet",};@@ -406,7 +406,7 @@ class CommonUtils {* This method returns a array, which is formmated as:* [* ['stream > topic', ['message 1', 'message 2']],- * ['You and Cordelia Lear', ['message 1', 'message 2']]+ * ['You and Cordelia, Lear's daughter', ['message 1', 'message 2']]* ]** The messages are sorted chronologically.diff --git a/frontend_tests/puppeteer_tests/compose.ts b/frontend_tests/puppeteer_tests/compose.tsindex bdc7075ef62..a9dc944f7dd 100644--- a/frontend_tests/puppeteer_tests/compose.ts+++ b/frontend_tests/puppeteer_tests/compose.ts@@ -112,13 +112,13 @@ async function test_open_close_compose_box(page: Page): Promise<void> {async function test_narrow_to_private_messages_with_cordelia(page: Page): Promise<void> {const you_and_cordelia_selector =- '*[title="Narrow to your private messages with Cordelia Lear"]';+ '*[title="Narrow to your private messages with Cordelia, Lear\'s daughter"]';// For some unknown reason page.click() isn't working here.await page.evaluate((selector: string) => document.querySelector<HTMLElement>(selector)!.click(),you_and_cordelia_selector,);- const cordelia_user_id = await common.get_user_id_from_name(page, "Cordelia Lear");+ const cordelia_user_id = await common.get_user_id_from_name(page, "Cordelia, Lear's daughter");const pm_list_selector = `li[data-user-ids-string="${cordelia_user_id}"].expanded_private_message.active-sub-filter`;await page.waitForSelector(pm_list_selector, {visible: true});await close_compose_box(page);diff --git a/frontend_tests/puppeteer_tests/drafts.ts b/frontend_tests/puppeteer_tests/drafts.tsindex 81c35f9bb7c..b270e02d45d 100644--- a/frontend_tests/puppeteer_tests/drafts.ts+++ b/frontend_tests/puppeteer_tests/drafts.ts@@ -104,7 +104,7 @@ async function test_previously_created_drafts_rendered(page: Page): Promise<voidpage,".draft-row .message_header_private_message .stream_label",),- "You and Cordelia Lear, King Hamlet",+ "You and Cordelia, Lear's daughter, King Hamlet",);assert.strictEqual(await common.get_text_from_selector(@@ -183,7 +183,7 @@ async function test_restore_private_message_draft(page: Page): Promise<void> {await common.pm_recipient.expect(page, `${cordelia_internal_email},${hamlet_internal_email}`);assert.strictEqual(await common.get_text_from_selector(page, "title"),- "Cordelia Lear, King Hamlet - Zulip Dev - Zulip",+ "Cordelia, Lear's daughter, King Hamlet - Zulip Dev - Zulip","Didn't narrow to the private messages with cordelia and hamlet",);await page.click("#compose_close");@@ -230,7 +230,7 @@ async function test_save_draft_by_reloading(page: Page): Promise<void> {page,".draft-row .message_header_private_message .stream_label",),- "You and Cordelia Lear",+ "You and Cordelia, Lear's daughter",);assert.strictEqual(await common.get_text_from_selector(diff --git a/frontend_tests/puppeteer_tests/edit.ts b/frontend_tests/puppeteer_tests/edit.tsindex 5020911b4bf..7af5ed24e56 100644--- a/frontend_tests/puppeteer_tests/edit.ts+++ b/frontend_tests/puppeteer_tests/edit.ts@@ -68,7 +68,7 @@ async function test_edit_private_message(page: Page): Promise<void> {await common.wait_for_fully_processed_message(page, "test edited pm");await common.check_messages_sent(page, "zhome", [- ["You and Cordelia Lear", ["test edited pm"]],+ ["You and Cordelia, Lear's daughter", ["test edited pm"]],]);}diff --git a/frontend_tests/puppeteer_tests/message-basics.ts b/frontend_tests/puppeteer_tests/message-basics.tsindex fe9f313770b..2262912444b 100644--- a/frontend_tests/puppeteer_tests/message-basics.ts+++ b/frontend_tests/puppeteer_tests/message-basics.ts@@ -14,11 +14,11 @@ async function expect_home(page: Page): Promise<void> {["Verona > test", ["verona test a", "verona test b"]],["Verona > other topic", ["verona other topic c"]],["Denmark > test", ["denmark message"]],- ["You and Cordelia Lear, King Hamlet", ["group pm a", "group pm b"]],- ["You and Cordelia Lear", ["pm c"]],+ ["You and Cordelia, Lear's daughter, King Hamlet", ["group pm a", "group pm b"]],+ ["You and Cordelia, Lear's daughter", ["pm c"]],["Verona > test", ["verona test d"]],- ["You and Cordelia Lear, King Hamlet", ["group pm d"]],- ["You and Cordelia Lear", ["pm e"]],+ ["You and Cordelia, Lear's daughter, King Hamlet", ["group pm d"]],+ ["You and Cordelia, Lear's daughter", ["pm e"]],]);}@@ -62,14 +62,22 @@ async function expect_test_topic(page: Page): Promise<void> {async function expect_huddle(page: Page): Promise<void> {await page.waitForSelector("#zfilt", {visible: true});await common.check_messages_sent(page, "zfilt", [- ["You and Cordelia Lear, King Hamlet", ["group pm a", "group pm b", "group pm d"]],+ [+ "You and Cordelia, Lear's daughter, King Hamlet",+ ["group pm a", "group pm b", "group pm d"],+ ],]);- assert.strictEqual(await page.title(), "Cordelia Lear, King Hamlet - Zulip Dev - Zulip");+ assert.strictEqual(+ await page.title(),+ "Cordelia, Lear's daughter, King Hamlet - Zulip Dev - Zulip",+ );}async function expect_cordelia_private_narrow(page: Page): Promise<void> {await page.waitForSelector("#zfilt", {visible: true});- await common.check_messages_sent(page, "zfilt", [["You and Cordelia Lear", ["pm c", "pm e"]]]);+ await common.check_messages_sent(page, "zfilt", [+ ["You and Cordelia, Lear's daughter", ["pm c", "pm e"]],+ ]);}async function un_narrow(page: Page): Promise<void> {@@ -108,9 +116,9 @@ async function test_navigations_from_home(page: Page): Promise<void> {console.log("Narrowing by clicking group personal header");await page.evaluate(() =>- $('*[title="Narrow to your private messages with Cordelia Lear, King Hamlet"]').trigger(- "click",- ),+ $(+ '*[title="Narrow to your private messages with Cordelia, Lear\'s daughter, King Hamlet"]',+ ).trigger("click"),);await expect_huddle(page);@@ -118,7 +126,9 @@ async function test_navigations_from_home(page: Page): Promise<void> {await expect_home(page);await page.evaluate(() =>- $('*[title="Narrow to your private messages with Cordelia Lear, King Hamlet"]').click(),+ $(+ '*[title="Narrow to your private messages with Cordelia, Lear\'s daughter, King Hamlet"]',+ ).click(),);await un_narrow_by_clicking_org_icon(page);await expect_recent_topics(page);@@ -190,7 +200,7 @@ async function search_tests(page: Page): Promise<void> {"Cordelia","Private",expect_cordelia_private_narrow,- "Cordelia Lear - Zulip Dev - Zulip",+ "Cordelia, Lear's daughter - Zulip Dev - Zulip",);await search_and_check(@@ -249,10 +259,10 @@ async function search_tests(page: Page): Promise<void> {async function expect_all_pm(page: Page): Promise<void> {await page.waitForSelector("#zfilt", {visible: true});await common.check_messages_sent(page, "zfilt", [- ["You and Cordelia Lear, King Hamlet", ["group pm a", "group pm b"]],- ["You and Cordelia Lear", ["pm c"]],- ["You and Cordelia Lear, King Hamlet", ["group pm d"]],- ["You and Cordelia Lear", ["pm e"]],+ ["You and Cordelia, Lear's daughter, King Hamlet", ["group pm a", "group pm b"]],+ ["You and Cordelia, Lear's daughter", ["pm c"]],+ ["You and Cordelia, Lear's daughter, King Hamlet", ["group pm d"]],+ ["You and Cordelia, Lear's daughter", ["pm e"]],]);assert.strictEqual(await common.get_text_from_selector(page, "#left_bar_compose_stream_button_big"),@@ -391,7 +401,7 @@ async function test_users_search(page: Page): Promise<void> {}await assert_in_list(page, "Desdemona");- await assert_in_list(page, "Cordelia Lear");+ await assert_in_list(page, "Cordelia, Lear's daughter");await assert_in_list(page, "King Hamlet");await assert_in_list(page, "aaron");@@ -399,7 +409,7 @@ async function test_users_search(page: Page): Promise<void> {await page.click("#user_filter_icon");await page.waitForSelector("#user_presences .highlighted_user", {visible: true});await assert_selected(page, "Desdemona");- await assert_not_selected(page, "Cordelia Lear");+ await assert_not_selected(page, "Cordelia, Lear's daughter");await assert_not_selected(page, "King Hamlet");await assert_not_selected(page, "aaron");@@ -407,7 +417,7 @@ async function test_users_search(page: Page): Promise<void> {// go down 2, up 3, then down 3// Desdemona// aaron- // Cordelia Lear+ // Cordelia, Lear's daughter// Iagoawait arrow(page, "Down");await arrow(page, "Down");@@ -426,7 +436,7 @@ async function test_users_search(page: Page): Promise<void> {await assert_not_selected(page, "aaron");await assert_not_selected(page, "Desdemona");- // arrow up and press Enter. We should be taken to pms with Cordelia Lear+ // arrow up and press Enter. We should be taken to pms with Cordelia, Lear's daughterawait arrow(page, "Up");await page.keyboard.press("Enter");await expect_cordelia_private_narrow(page);diff --git a/zerver/tests/fixtures/ldap/directory.json b/zerver/tests/fixtures/ldap/directory.jsonindex 36e3adc22ab..bf1d5f387e1 100644--- a/zerver/tests/fixtures/ldap/directory.json+++ b/zerver/tests/fixtures/ldap/directory.json@@ -18,7 +18,7 @@"uid=cordelia,ou=users,dc=zulip,dc=com": {"objectClass": ["user"],- "cn": ["Cordelia Lear"],+ "cn": ["Cordelia, Lear's daughter"],"uid": ["cordelia"],"mail": ["[email protected]"],"sn": ["Cordelia"]diff --git a/zerver/tests/test_email_notifications.py b/zerver/tests/test_email_notifications.pyindex 811ea5993a1..81f559b9bb8 100644--- a/zerver/tests/test_email_notifications.py+++ b/zerver/tests/test_email_notifications.py@@ -452,7 +452,7 @@ class TestMissedMessages(ZulipTestCase):self.example_user("othello"), "Denmark", "@**King Hamlet**")verify_body_include = [- "Cordelia Lear: 0 1 2 Othello, the Moor of Venice: @**King Hamlet** -- ",+ "Cordelia, Lear's daughter: 0 1 2 Othello, the Moor of Venice: @**King Hamlet** -- ","You are receiving this because you were mentioned in Zulip Dev.",]email_subject = "#Denmark > test"@@ -583,7 +583,9 @@ class TestMissedMessages(ZulipTestCase):)verify_body_include = ["Othello, the Moor of Venice: Group personal message! -- Reply"]- email_subject = "Group PMs with Cordelia Lear, Iago, and Othello, the Moor of Venice"+ email_subject = (+ "Group PMs with Cordelia, Lear's daughter, Iago, and Othello, the Moor of Venice"+ )self._test_cases(msg_id, verify_body_include, email_subject, send_as_user)def _extra_context_in_huddle_missed_stream_messages_many_others(@@ -601,7 +603,7 @@ class TestMissedMessages(ZulipTestCase):)verify_body_include = ["Othello, the Moor of Venice: Group personal message! -- Reply"]- email_subject = "Group PMs with Cordelia Lear, Iago, and 2 others"+ email_subject = "Group PMs with Cordelia, Lear's daughter, Iago, and 2 others"self._test_cases(msg_id, verify_body_include, email_subject, send_as_user)def _deleted_message_in_missed_stream_messages(self, send_as_user: bool) -> None:diff --git a/zerver/tests/test_import_export.py b/zerver/tests/test_import_export.pyindex 10bce4b2d3e..baa74355b0b 100644--- a/zerver/tests/test_import_export.py+++ b/zerver/tests/test_import_export.py@@ -949,7 +949,7 @@ class ImportExportTest(ZulipTestCase):assert_realm_values(get_realm_audit_log_event_type)- cordelia_full_name = "Cordelia Lear"+ cordelia_full_name = "Cordelia, Lear's daughter"hamlet_full_name = "King Hamlet"othello_full_name = "Othello, the Moor of Venice"diff --git a/zerver/tests/test_markdown.py b/zerver/tests/test_markdown.pyindex 44d3cd8bebe..2940e1d4e22 100644--- a/zerver/tests/test_markdown.py+++ b/zerver/tests/test_markdown.py@@ -229,10 +229,10 @@ class MarkdownMiscTest(ZulipTestCase):fred4 = make_user("[email protected]", "Fred Flintstone")lst = get_possible_mentions_info(- realm.id, {"Fred Flintstone", "cordelia LEAR", "Not A User"}+ realm.id, {"Fred Flintstone", "Cordelia, LEAR's daughter", "Not A User"})set_of_names = set(map(lambda x: x["full_name"].lower(), lst))- self.assertEqual(set_of_names, {"fred flintstone", "cordelia lear"})+ self.assertEqual(set_of_names, {"fred flintstone", "cordelia, lear's daughter"})by_id = {row["id"]: row for row in lst}self.assertEqual(@@ -256,7 +256,7 @@ class MarkdownMiscTest(ZulipTestCase):realm = get_realm("zulip")hamlet = self.example_user("hamlet")cordelia = self.example_user("cordelia")- content = "@**King Hamlet** @**Cordelia lear**"+ content = "@**King Hamlet** @**Cordelia, lear's daughter**"mention_data = MentionData(realm.id, content)self.assertEqual(mention_data.get_user_ids(), {hamlet.id, cordelia.id})self.assertEqual(@@ -273,7 +273,7 @@ class MarkdownMiscTest(ZulipTestCase):self.assertEqual(user["email"], hamlet.email)self.assertFalse(mention_data.message_has_wildcards())- content = "@**King Hamlet** @**Cordelia lear** @**all**"+ content = "@**King Hamlet** @**Cordelia, lear's daughter** @**all**"mention_data = MentionData(realm.id, content)self.assertTrue(mention_data.message_has_wildcards())@@ -1946,8 +1946,8 @@ class MarkdownTest(ZulipTestCase):assert_mentions("smush@**steve**smush", set())assert_mentions(- f"Hello @**King Hamlet**, @**|{aaron.id}** and @**Cordelia Lear**\n@**Foo van Barson|1234** @**all**",- {"King Hamlet", f"|{aaron.id}", "Cordelia Lear", "Foo van Barson|1234"},+ f"Hello @**King Hamlet**, @**|{aaron.id}** and @**Cordelia, Lear's daughter**\n@**Foo van Barson|1234** @**all**",+ {"King Hamlet", f"|{aaron.id}", "Cordelia, Lear's daughter", "Foo van Barson|1234"},True,)@@ -1957,7 +1957,7 @@ class MarkdownTest(ZulipTestCase):cordelia = self.example_user("cordelia")msg = Message(sender=sender_user_profile, sending_client=get_client("test"))- content = "@**King Hamlet** and @**Cordelia Lear**, check this out"+ content = "@**King Hamlet** and @**Cordelia, Lear's daughter**, check this out"self.assertEqual(render_markdown(msg, content),@@ -1965,7 +1965,7 @@ class MarkdownTest(ZulipTestCase):'<span class="user-mention" 'f'data-user-id="{hamlet.id}">@King Hamlet</span> and ''<span class="user-mention" '- f'data-user-id="{cordelia.id}">@Cordelia Lear</span>, '+ f'data-user-id="{cordelia.id}">@Cordelia, Lear\'s daughter</span>, '"check this out</p>",)self.assertEqual(msg.mentions_user_ids, {hamlet.id, cordelia.id})@@ -1976,7 +1976,7 @@ class MarkdownTest(ZulipTestCase):cordelia = self.example_user("cordelia")msg = Message(sender=othello, sending_client=get_client("test"))- content = "> @**King Hamlet** and @**Othello, the Moor of Venice**\n\n @**King Hamlet** and @**Cordelia Lear**"+ content = "> @**King Hamlet** and @**Othello, the Moor of Venice**\n\n @**King Hamlet** and @**Cordelia, Lear's daughter**"self.assertEqual(render_markdown(msg, content),"<blockquote>\n<p>"@@ -1987,7 +1987,7 @@ class MarkdownTest(ZulipTestCase):"<p>"f'<span class="user-mention" data-user-id="{hamlet.id}">@King Hamlet</span>'" and "- f'<span class="user-mention" data-user-id="{cordelia.id}">@Cordelia Lear</span>'+ f'<span class="user-mention" data-user-id="{cordelia.id}">@Cordelia, Lear\'s daughter</span>'"</p>",)self.assertEqual(msg.mentions_user_ids, {hamlet.id, cordelia.id})@@ -2028,9 +2028,7 @@ class MarkdownTest(ZulipTestCase):cordelia = self.example_user("cordelia")msg = Message(sender=sender_user_profile, sending_client=get_client("test"))- content = (- f"@**Mark Twin|{twin1.id}**, @**Mark Twin|{twin2.id}** and @**Cordelia Lear**, hi."- )+ content = f"@**Mark Twin|{twin1.id}**, @**Mark Twin|{twin2.id}** and @**Cordelia, Lear's daughter**, hi."self.assertEqual(render_markdown(msg, content),@@ -2040,7 +2038,7 @@ class MarkdownTest(ZulipTestCase):'<span class="user-mention" 'f'data-user-id="{twin2.id}">@Mark Twin</span> and ''<span class="user-mention" '- f'data-user-id="{cordelia.id}">@Cordelia Lear</span>, '+ f'data-user-id="{cordelia.id}">@Cordelia, Lear\'s daughter</span>, '"hi.</p>",)self.assertEqual(msg.mentions_user_ids, {twin1.id, twin2.id, cordelia.id})@@ -2180,7 +2178,7 @@ class MarkdownTest(ZulipTestCase):assert_mentions("smush@*steve*smush", set())assert_mentions(- "@*support* Hello @**King Hamlet** and @**Cordelia Lear**\n"+ "@*support* Hello @**King Hamlet** and @**Cordelia, Lear's daughter**\n""@**Foo van Barson** @**all**",{"support"},)diff --git a/zerver/tests/test_message_edit.py b/zerver/tests/test_message_edit.pyindex fdccd3ce055..e155c50b174 100644--- a/zerver/tests/test_message_edit.py+++ b/zerver/tests/test_message_edit.py@@ -439,7 +439,9 @@ class EditMessageTest(ZulipTestCase):self.subscribe(hamlet, "Scotland")self.subscribe(cordelia, "Scotland")- msg_id = self.send_stream_message(hamlet, "Scotland", content="@**Cordelia Lear**")+ msg_id = self.send_stream_message(+ hamlet, "Scotland", content="@**Cordelia, Lear's daughter**"+ )user_info = get_user_info_for_message_updates(msg_id)message_user_ids = user_info["message_user_ids"]diff --git a/zerver/tests/test_message_edit_notifications.py b/zerver/tests/test_message_edit_notifications.pyindex 56f9159c8b9..98b765013eb 100644--- a/zerver/tests/test_message_edit_notifications.py+++ b/zerver/tests/test_message_edit_notifications.py@@ -40,7 +40,7 @@ class EditMessageSideEffectsTest(ZulipTestCase):self._assert_update_does_not_notify_anybody(message_id=message_id,- content="now we mention @**Cordelia Lear**",+ content="now we mention @**Cordelia, Lear's daughter**",)def _login_and_send_original_stream_message(@@ -177,7 +177,7 @@ class EditMessageSideEffectsTest(ZulipTestCase):def test_updates_with_stream_mention(self) -> None:original_content = "no mention"- updated_content = "now we mention @**Cordelia Lear**"+ updated_content = "now we mention @**Cordelia, Lear's daughter**"notification_message_data = self._send_and_update_message(original_content, updated_content)message_id = notification_message_data["message_id"]@@ -217,8 +217,8 @@ class EditMessageSideEffectsTest(ZulipTestCase):self.assertEqual(email_event["trigger"], "mentioned")def test_second_mention_is_ignored(self) -> None:- original_content = "hello @**Cordelia Lear**"- updated_content = "re-mention @**Cordelia Lear**"+ original_content = "hello @**Cordelia, Lear's daughter**"+ updated_content = "re-mention @**Cordelia, Lear's daughter**"self._send_and_update_message(original_content, updated_content, expect_short_circuit=True)def _turn_on_stream_push_for_cordelia(self) -> None:@@ -305,7 +305,7 @@ class EditMessageSideEffectsTest(ZulipTestCase):# Simulate Cordelia is FULLY present, not just in term of# browser activity, but also in terms of her client descriptors.original_content = "no mention"- updated_content = "newly mention @**Cordelia Lear**"+ updated_content = "newly mention @**Cordelia, Lear's daughter**"notification_message_data = self._send_and_update_message(original_content,updated_content,@@ -385,7 +385,7 @@ class EditMessageSideEffectsTest(ZulipTestCase):# but they don't have UserPresence rows, so we will still# send offline notifications.original_content = "no mention"- updated_content = "now we mention @**Cordelia Lear**"+ updated_content = "now we mention @**Cordelia, Lear's daughter**"notification_message_data = self._send_and_update_message(original_content,updated_content,@@ -453,7 +453,7 @@ class EditMessageSideEffectsTest(ZulipTestCase):# If there was a previous wildcard mention delivered to the# user (because wildcard_mention_notify=True), we don't notifyoriginal_content = "Mention @**all**"- updated_content = "now we mention @**Cordelia Lear**"+ updated_content = "now we mention @**Cordelia, Lear's daughter**"self._send_and_update_message(original_content, updated_content, expect_short_circuit=True, connected_to_zulip=True)@@ -470,7 +470,7 @@ class EditMessageSideEffectsTest(ZulipTestCase):cordelia.save()original_content = "Mention @**all**"- updated_content = "now we mention @**Cordelia Lear**"+ updated_content = "now we mention @**Cordelia, Lear's daughter**"self._send_and_update_message(original_content, updated_content, expect_short_circuit=True, connected_to_zulip=True)@@ -481,7 +481,7 @@ class EditMessageSideEffectsTest(ZulipTestCase):# Simulate Cordelia is FULLY present, not just in term of# browser activity, but also in terms of her client descriptors.original_content = "no mention"- updated_content = "now we mention @**Cordelia Lear**"+ updated_content = "now we mention @**Cordelia, Lear's daughter**"notification_message_data = self._send_and_update_message(original_content,updated_content,diff --git a/zerver/tests/test_message_send.py b/zerver/tests/test_message_send.pyindex 62b97be8e33..e35cc7ff864 100644--- a/zerver/tests/test_message_send.py+++ b/zerver/tests/test_message_send.py@@ -1642,7 +1642,7 @@ class StreamMessagesTest(ZulipTestCase):).delete()def mention_cordelia() -> Set[int]:- content = "test @**Cordelia Lear** rules"+ content = "test @**Cordelia, Lear's daughter** rules"user_ids = self._send_stream_message(user=hamlet,diff --git a/zerver/tests/test_new_users.py b/zerver/tests/test_new_users.pyindex 25fb08a51da..43d1483ab53 100644--- a/zerver/tests/test_new_users.py+++ b/zerver/tests/test_new_users.py@@ -249,5 +249,6 @@ class TestNotifyNewUser(ZulipTestCase):actual_stream = Stream.objects.get(id=message.recipient.type_id)self.assertEqual(actual_stream.name, Realm.INITIAL_PRIVATE_STREAM_NAME)self.assertIn(- f"@_**Cordelia Lear|{new_user.id}** just signed up for Zulip.", message.content+ f"@_**Cordelia, Lear's daughter|{new_user.id}** just signed up for Zulip.",+ message.content,)diff --git a/zerver/tests/test_push_notifications.py b/zerver/tests/test_push_notifications.pyindex ca06aa604c5..adc1fad7e55 100644--- a/zerver/tests/test_push_notifications.py+++ b/zerver/tests/test_push_notifications.py@@ -1490,7 +1490,7 @@ class TestGetAPNsPayload(PushNotificationTest):payload = get_message_payload_apns(user_profile, message)expected = {"alert": {- "title": "Cordelia Lear, King Hamlet, Othello, the Moor of Venice",+ "title": "Cordelia, Lear's daughter, King Hamlet, Othello, the Moor of Venice","subtitle": "King Hamlet:","body": message.content,},@@ -1622,7 +1622,7 @@ class TestGetAPNsPayload(PushNotificationTest):payload = get_message_payload_apns(user_profile, message)expected = {"alert": {- "title": "Cordelia Lear, King Hamlet, Othello, the Moor of Venice",+ "title": "Cordelia, Lear's daughter, King Hamlet, Othello, the Moor of Venice","subtitle": "King Hamlet:","body": "***REDACTED***",},@@ -2298,8 +2298,8 @@ class TestPushNotificationsContent(ZulipTestCase):},{"name": "mentions",- "rendered_content": f'<p>Mentioning <span class="user-mention" data-user-id="{cordelia.id}">@Cordelia Lear</span>.</p>',- "expected_output": "Mentioning @Cordelia Lear.",+ "rendered_content": f'<p>Mentioning <span class="user-mention" data-user-id="{cordelia.id}">@Cordelia, Lear\'s daughter</span>.</p>',+ "expected_output": "Mentioning @Cordelia, Lear's daughter.",},{"name": "stream_names",diff --git a/zerver/tests/test_soft_deactivation.py b/zerver/tests/test_soft_deactivation.pyindex a936123cf67..02fb0f7d44e 100644--- a/zerver/tests/test_soft_deactivation.py+++ b/zerver/tests/test_soft_deactivation.py@@ -671,7 +671,7 @@ class SoftDeactivationMessageTest(ZulipTestCase):# anyone is mentioned but the user.general_user_msg_count = len(get_user_messages(cordelia))soft_deactivated_user_msg_count = len(get_user_messages(long_term_idle_user))- message = "Test @**Cordelia Lear** mention"+ message = "Test @**Cordelia, Lear's daughter** mention"send_stream_message(message)assert_last_um_content(long_term_idle_user, message, negate=True)assert_um_count(long_term_idle_user, soft_deactivated_user_msg_count)diff --git a/zerver/tests/test_users.py b/zerver/tests/test_users.pyindex e6815d9467c..30f1b2dc575 100644--- a/zerver/tests/test_users.py+++ b/zerver/tests/test_users.py@@ -1221,8 +1221,8 @@ class UserProfileTest(ZulipTestCase):self.assertEqual(len(events), 0)# We verify that cordelia and iago match, but hamlet has the defaults.- self.assertEqual(iago.full_name, "Cordelia Lear")- self.assertEqual(cordelia.full_name, "Cordelia Lear")+ self.assertEqual(iago.full_name, "Cordelia, Lear's daughter")+ self.assertEqual(cordelia.full_name, "Cordelia, Lear's daughter")self.assertEqual(hamlet.full_name, "King Hamlet")self.assertEqual(iago.default_language, "de")diff --git a/zerver/webhooks/intercom/fixtures/conversation_admin_closed.json b/zerver/webhooks/intercom/fixtures/conversation_admin_closed.jsonindex 8d6243de05b..c7bfb2a9aeb 100644--- a/zerver/webhooks/intercom/fixtures/conversation_admin_closed.json+++ b/zerver/webhooks/intercom/fixtures/conversation_admin_closed.json@@ -19,7 +19,7 @@"assignee":{"type":"admin","id":"1957471",- "name":"Cordelia Lear",+ "name":"Cordelia, Lear's daughter","email":"[email protected]"},"conversation_message":{diff --git a/zerver/webhooks/intercom/fixtures/conversation_admin_noted.json b/zerver/webhooks/intercom/fixtures/conversation_admin_noted.jsonindex 2151c8e01d6..443fda23668 100644--- a/zerver/webhooks/intercom/fixtures/conversation_admin_noted.json+++ b/zerver/webhooks/intercom/fixtures/conversation_admin_noted.json@@ -19,7 +19,7 @@"assignee": {"type": "admin","id": "1957471",- "name": "Cordelia Lear",+ "name": "Cordelia, Lear's daughter","email": "[email protected]"},"conversation_message": {diff --git a/zerver/webhooks/intercom/fixtures/conversation_admin_opened.json b/zerver/webhooks/intercom/fixtures/conversation_admin_opened.jsonindex d6d307f88aa..0060eb9aefd 100644--- a/zerver/webhooks/intercom/fixtures/conversation_admin_opened.json+++ b/zerver/webhooks/intercom/fixtures/conversation_admin_opened.json@@ -12,7 +12,7 @@"type": "lead","id": "5c96b58c27e3772c4751b2a3","user_id": "ced6189f-e3b0-40b6-ab3a-9fdb27f4b3b0",- "name": "Cordelia Lear",+ "name": "Cordelia, Lear's daughter","email": "[email protected]","do_not_track": null},diff --git a/zerver/webhooks/intercom/fixtures/conversation_admin_replied.json b/zerver/webhooks/intercom/fixtures/conversation_admin_replied.jsonindex 2b5be57cb38..9944b8fa13a 100644--- a/zerver/webhooks/intercom/fixtures/conversation_admin_replied.json+++ b/zerver/webhooks/intercom/fixtures/conversation_admin_replied.json@@ -19,7 +19,7 @@"assignee":{"type": "admin","id": "1957471",- "name": "Cordelia Lear",+ "name": "Cordelia, Lear's daughter","email": "[email protected]"},"conversation_message":{diff --git a/zerver/webhooks/intercom/fixtures/conversation_admin_single_created.json b/zerver/webhooks/intercom/fixtures/conversation_admin_single_created.jsonindex 07697b8ee9c..9613cd85433 100644--- a/zerver/webhooks/intercom/fixtures/conversation_admin_single_created.json+++ b/zerver/webhooks/intercom/fixtures/conversation_admin_single_created.json@@ -19,7 +19,7 @@"assignee": {"type": "admin","id": "1957471",- "name": "Cordelia Lear",+ "name": "Cordelia, Lear's daughter","email": "[email protected]"},"conversation_message": {diff --git a/zerver/webhooks/intercom/fixtures/conversation_admin_snoozed.json b/zerver/webhooks/intercom/fixtures/conversation_admin_snoozed.jsonindex 9be003e8559..78c9978160d 100644--- a/zerver/webhooks/intercom/fixtures/conversation_admin_snoozed.json+++ b/zerver/webhooks/intercom/fixtures/conversation_admin_snoozed.json@@ -19,7 +19,7 @@"assignee": {"type": "admin","id": "1957471",- "name": "Cordelia Lear",+ "name": "Cordelia, Lear's daughter","email": "[email protected]"},"conversation_message": {diff --git a/zerver/webhooks/intercom/fixtures/conversation_admin_unsnoozed.json b/zerver/webhooks/intercom/fixtures/conversation_admin_unsnoozed.jsonindex e2f0f56d6be..3c3e026861f 100644--- a/zerver/webhooks/intercom/fixtures/conversation_admin_unsnoozed.json+++ b/zerver/webhooks/intercom/fixtures/conversation_admin_unsnoozed.json@@ -19,7 +19,7 @@"assignee": {"type": "admin","id": "1957471",- "name": "Cordelia Lear",+ "name": "Cordelia, Lear's daughter","email": "[email protected]"},"conversation_message": {diff --git a/zerver/webhooks/intercom/tests.py b/zerver/webhooks/intercom/tests.pyindex b444e71e492..6e126d5ceb0 100644--- a/zerver/webhooks/intercom/tests.py+++ b/zerver/webhooks/intercom/tests.py@@ -93,7 +93,7 @@ Contact signed up:)def test_conversation_admin_opened(self) -> None:- expected_topic = "Lead: Cordelia Lear"+ expected_topic = "Lead: Cordelia, Lear's daughter"expected_message = "Eeshan Garg opened the conversation."self.check_webhook("conversation_admin_opened",@@ -103,7 +103,7 @@ Contact signed up:def test_conversation_admin_closed(self) -> None:expected_topic = "Lead: Eeshan Garg"- expected_message = "Cordelia Lear closed the conversation."+ expected_message = "Cordelia, Lear's daughter closed the conversation."self.check_webhook("conversation_admin_closed",expected_topic,@@ -112,7 +112,7 @@ Contact signed up:def test_conversation_admin_snoozed(self) -> None:expected_topic = "Lead: Eeshan Garg"- expected_message = "Cordelia Lear snoozed the conversation."+ expected_message = "Cordelia, Lear's daughter snoozed the conversation."self.check_webhook("conversation_admin_snoozed",expected_topic,@@ -121,7 +121,7 @@ Contact signed up:def test_conversation_admin_unsnoozed(self) -> None:expected_topic = "Lead: Eeshan Garg"- expected_message = "Cordelia Lear unsnoozed the conversation."+ expected_message = "Cordelia, Lear's daughter unsnoozed the conversation."self.check_webhook("conversation_admin_unsnoozed",expected_topic,@@ -131,7 +131,7 @@ Contact signed up:def test_conversation_admin_replied(self) -> None:expected_topic = "Lead: Eeshan Garg"expected_message = """-Cordelia Lear replied to the conversation:+Cordelia, Lear's daughter replied to the conversation:``` quoteHey Eeshan! How can I help?@@ -146,7 +146,7 @@ Hey Eeshan! How can I help?def test_conversation_admin_noted(self) -> None:expected_topic = "Lead: Eeshan Garg"expected_message = """-Cordelia Lear added a note to the conversation:+Cordelia, Lear's daughter added a note to the conversation:``` quoteTalk to Tim about this user's query.@@ -161,7 +161,7 @@ Talk to Tim about this user's query.def test_conversation_admin_single_created(self) -> None:expected_topic = "Lead: Eeshan Garg"expected_message = """-Cordelia Lear initiated a conversation:+Cordelia, Lear's daughter initiated a conversation:``` quoteHi Eeshan, What's updiff --git a/zilencer/management/commands/populate_db.py b/zilencer/management/commands/populate_db.pyindex aa85973bdf2..f4c01938191 100644--- a/zilencer/management/commands/populate_db.py+++ b/zilencer/management/commands/populate_db.py@@ -344,7 +344,7 @@ class Command(BaseCommand):("Othello, the Moor of Venice", "[email protected]"),("Iago", "[email protected]"),("Prospero from The Tempest", "[email protected]"),- ("Cordelia Lear", "[email protected]"),+ ("Cordelia, Lear's daughter", "[email protected]"),("King Hamlet", "[email protected]"),("aaron", "[email protected]"),("Polonius", "[email protected]"),@@ -746,7 +746,7 @@ class Command(BaseCommand):testsuite_lear_users = [("King Lear", "[email protected]"),- ("Cordelia Lear", "[email protected]"),+ ("Cordelia, Lear's daughter", "[email protected]"),]create_users(lear_realm, testsuite_lear_users, tos_version=settings.TOS_VERSION)