mirror of
https://github.com/zulip/zulip.git
synced 2025-11-22 07:21:23 +00:00
reactions: Use parameter destructuring in view.remove_reaction.
This is a pure code refactor for readability.
This commit is contained in:
@@ -383,12 +383,15 @@ export function remove_reaction(event) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
view.remove_reaction = function (opts) {
|
view.remove_reaction = function ({
|
||||||
const message_id = opts.message_id;
|
message_id,
|
||||||
const emoji_name = opts.emoji_name;
|
emoji_name,
|
||||||
const user_list = opts.user_list;
|
user_list,
|
||||||
const user_id = opts.user_id;
|
user_id,
|
||||||
const local_id = get_local_reaction_id(opts);
|
reaction_type,
|
||||||
|
emoji_code,
|
||||||
|
}) {
|
||||||
|
const local_id = get_local_reaction_id({reaction_type, emoji_code});
|
||||||
const reaction = find_reaction(message_id, local_id);
|
const reaction = find_reaction(message_id, local_id);
|
||||||
|
|
||||||
if (user_list.length === 0) {
|
if (user_list.length === 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user