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.

bot_data: Eliminate owner field.

Junyao Chend8c6311e33b6
diff --git a/web/src/bot_data.ts b/web/src/bot_data.ts
index f9a3b64591a..3fceb5a8bf1 100644
--- a/web/src/bot_data.ts
+++ b/web/src/bot_data.ts
@@ -26,7 +26,6 @@ const basic_bot_schema = z.object({
email: z.string(),
full_name: z.string(),
is_active: z.boolean(),
- owner: z.union([z.string(), z.undefined()]),
owner_id: z.number(),
user_id: z.number(),
});
diff --git a/web/tests/bot_data.test.js b/web/tests/bot_data.test.js
index 4b066fe853e..0a1035f992c 100644
--- a/web/tests/bot_data.test.js
+++ b/web/tests/bot_data.test.js
@@ -37,7 +37,6 @@ const bot_data_params = {
full_name: "Bot 0",
is_active: true,
- owner: "someone 4",
owner_id: 4,
user_id: 42,
services: [],
@@ -53,7 +52,6 @@ const bot_data_params = {
full_name: "Outgoing webhook",
is_active: true,
- owner: "someone 5",
owner_id: 5,
user_id: 314,
services: [{base_url: "http://foo.com", interface: 1, token: "basictoken12345"}],
@@ -86,7 +84,6 @@ test("test_basics", () => {
full_name: "Bot 1",
is_active: true,
- owner: "someone 6",
owner_id: 6,
user_id: 43,
services: [
@@ -108,7 +105,6 @@ test("test_basics", () => {
full_name: "Embedded bot 1",
is_active: true,
- owner: "[email protected]",
owner_id: 7,
user_id: 143,
services: [
@@ -133,7 +129,6 @@ test("test_basics", () => {
assert.equal("[email protected]", bot.email);
assert.equal("Bot 1", bot.full_name);
assert.equal(true, bot.is_active);
- assert.equal("someone 6", bot.owner);
assert.equal(6, bot.owner_id);
assert.equal(43, bot.user_id);
assert.equal("http://bar.com", services[0].base_url);