mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
settings_bots: Remove unused functions.
This commit removes bot_error function in settings_bots.js since it is not used now. It was added ind90d1a04and was used in error handling, but since we changed the design to show dialog for reactivation and deactivation of bots and errors are shown inside the dialog and errors are handled differently and thus the function's usage was removed ina9893fb654. This commit also removes get_bot_info_div which was only used by bot_error function.
This commit is contained in:
@@ -48,20 +48,6 @@ const focus_tab = {
|
||||
},
|
||||
};
|
||||
|
||||
export function get_bot_info_div(bot_id) {
|
||||
const sel = `.bot_info[data-user-id="${CSS.escape(bot_id)}"]`;
|
||||
return $(sel).expectOne();
|
||||
}
|
||||
|
||||
export function bot_error(bot_id, xhr) {
|
||||
const $bot_info = get_bot_info_div(bot_id);
|
||||
const $bot_error_div = $bot_info.find(".bot_error");
|
||||
$bot_error_div.text(JSON.parse(xhr.responseText).msg);
|
||||
$bot_error_div.show();
|
||||
const $bot_box = $bot_info.closest(".bot-information-box");
|
||||
$bot_box.scrollTop($bot_box[0].scrollHeight - $bot_box[0].clientHeight);
|
||||
}
|
||||
|
||||
function add_bot_row(info) {
|
||||
const $row = $(render_bot_avatar_row(info));
|
||||
if (info.is_active) {
|
||||
|
||||
Reference in New Issue
Block a user