Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

reactions: Rename `get_reaction_section`.

Aman Agrawal37b0f59200e5
diff --git a/web/src/reactions.js b/web/src/reactions.js
index 5242af5caff..5baa60adb8f 100644
--- a/web/src/reactions.js
+++ b/web/src/reactions.js
@@ -202,19 +202,19 @@ export function get_reaction_title_data(message_id, local_id) {
return title;
}
-export function get_reaction_section(message_id) {
+export function get_reaction_sections(message_id) {
const $rows = message_lists.all_rendered_row_for_message_id(message_id);
return $rows.find(".message_reactions");
}
export function find_reaction(message_id, local_id) {
- const $reaction_section = get_reaction_section(message_id);
+ const $reaction_section = get_reaction_sections(message_id);
const $reaction = $reaction_section.find(`[data-reaction-id='${CSS.escape(local_id)}']`);
return $reaction;
}
export function get_add_reaction_button(message_id) {
- const $reaction_section = get_reaction_section(message_id);
+ const $reaction_section = get_reaction_sections(message_id);
const $add_button = $reaction_section.find(".reaction_button");
return $add_button;
}
diff --git a/web/tests/reactions.test.js b/web/tests/reactions.test.js
index 7b68818f01f..212a64b7607 100644
--- a/web/tests/reactions.test.js
+++ b/web/tests/reactions.test.js
@@ -545,10 +545,10 @@ test("find_reaction", () => {
assert.equal(reactions.find_reaction(message_id, local_id), $reaction);
});
-test("get_reaction_section", () => {
+test("get_reaction_sections", () => {
const $message_reactions = stub_reactions(555);
- const $section = reactions.get_reaction_section(555);
+ const $section = reactions.get_reaction_sections(555);
assert.equal($section, $message_reactions);
});