diff --git a/.changeset/blue-books-wash.md b/.changeset/blue-books-wash.md new file mode 100644 index 0000000000000..95f0b7e1f5867 --- /dev/null +++ b/.changeset/blue-books-wash.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/rest-typings": patch +--- + +Fixes an issue that prevented the action of saving an agent when editing a department to work. diff --git a/apps/meteor/tests/end-to-end/api/livechat/10-departments.ts b/apps/meteor/tests/end-to-end/api/livechat/10-departments.ts index 3b4a191cd5120..99ca5591b25a4 100644 --- a/apps/meteor/tests/end-to-end/api/livechat/10-departments.ts +++ b/apps/meteor/tests/end-to-end/api/livechat/10-departments.ts @@ -907,7 +907,8 @@ import { IS_EE } from '../../../e2e/config/constants'; const res = await request .post(api(`livechat/department/${dep._id}/agents`)) .set(credentials) - .send({ upsert: [{ agentId: agent._id, username: agent.username }], remove: [] }) + // UI sends agent name as well. API doens't use it, but keeping here for avoid Breaking Changes + .send({ upsert: [{ agentId: agent._id, username: agent.username, name: agent.name }], remove: [] }) .expect(200); expect(res.body).to.have.property('success', true); await deleteDepartment(dep._id); diff --git a/packages/rest-typings/src/v1/omnichannel.ts b/packages/rest-typings/src/v1/omnichannel.ts index 1992e860bc037..7ab919ca9c6ac 100644 --- a/packages/rest-typings/src/v1/omnichannel.ts +++ b/packages/rest-typings/src/v1/omnichannel.ts @@ -165,8 +165,8 @@ export const isLivechatDepartmentDepartmentIdAgentsGETProps = ajv.compile