Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
bot_data: Remove the stale 'get_editable' function.
Prakhar Pratyusha94cc47879b6
diff --git a/web/src/bot_data.ts b/web/src/bot_data.tsindex 07aadc2da6e..4026dc3cf19 100644--- a/web/src/bot_data.ts+++ b/web/src/bot_data.ts@@ -58,16 +58,6 @@ export function get_all_bots_for_current_user(): Bot[] {return ret;}-export function get_editable(): Bot[] {- const ret = [];- for (const bot of bots.values()) {- if (bot.is_active && bot.owner_id !== null && people.is_my_user_id(bot.owner_id)) {- ret.push(bot);- }- }- return ret;-}-export function get_all_bots_owned_by_user(user_id: number): Bot[] {const ret = [];for (const bot of bots.values()) {diff --git a/web/tests/bot_data.test.cjs b/web/tests/bot_data.test.cjsindex bc4840fc887..1a5ddbcda90 100644--- a/web/tests/bot_data.test.cjs+++ b/web/tests/bot_data.test.cjs@@ -201,7 +201,7 @@ test("test_basics", () => {assert.equal(bot, undefined);})();- (function test_get_editable() {+ (function test_get_all_bots_for_current_user() {bot_data.add({...test_bot, user_id: 44, owner_id: me.user_id, is_active: true});bot_data.add({...test_bot,@@ -218,11 +218,6 @@ test("test_basics", () => {is_active: true,});- const editable_bots = bot_data.get_editable().map((bot) => bot.email);- assert.deepEqual(["[email protected]", "[email protected]"], editable_bots);- })();-- (function test_get_all_bots_for_current_user() {const bots = bot_data.get_all_bots_for_current_user();assert.equal(bots.length, 2);