mirror of https://github.com/zulip/zulip.git
bot_data: Eliminate owner field.
`owner` is a legacy key in one of bot data field. We would like to remove this field as it's not used in the codebase. `owner_id` is the identifier to find the owner of a bot. CZO discussion: https://chat.zulip.org/#narrow/stream/6-frontend/topic/Can.20we.20mark.20.60owner.60.20field.20in.20bot.20data.20optional.3F/near/1625968
This commit is contained in:
parent
983c6b74ab
commit
d8c6311e33
|
@ -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(),
|
||||
});
|
||||
|
|
|
@ -37,7 +37,6 @@ const bot_data_params = {
|
|||
email: "bot0@zulip.com",
|
||||
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 = {
|
|||
email: "outgoingwebhook@zulip.com",
|
||||
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", () => {
|
|||
email: "bot1@zulip.com",
|
||||
full_name: "Bot 1",
|
||||
is_active: true,
|
||||
owner: "someone 6",
|
||||
owner_id: 6,
|
||||
user_id: 43,
|
||||
services: [
|
||||
|
@ -108,7 +105,6 @@ test("test_basics", () => {
|
|||
email: "embedded-bot@zulip.com",
|
||||
full_name: "Embedded bot 1",
|
||||
is_active: true,
|
||||
owner: "cordelia@zulip.com",
|
||||
owner_id: 7,
|
||||
user_id: 143,
|
||||
services: [
|
||||
|
@ -133,7 +129,6 @@ test("test_basics", () => {
|
|||
assert.equal("bot1@zulip.com", 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);
|
||||
|
|
Loading…
Reference in New Issue