From 2c2a35af24d4e1d0305cf134bf1e157da91a30c5 Mon Sep 17 00:00:00 2001 From: Hiago Hubert Date: Mon, 2 Dec 2024 11:13:22 -0300 Subject: [PATCH] fix: username (Post as) field is not being updated in incoming webhook integration panel (#34085) Co-authored-by: Guilherme Gazzo <5263975+ggazzo@users.noreply.github.com> --- .../server/methods/incoming/updateIncomingIntegration.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.ts b/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.ts index 071cb563b01a..b4ef5b9bf973 100644 --- a/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.ts +++ b/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.ts @@ -23,6 +23,7 @@ declare module '@rocket.chat/ddp-client' { } Meteor.methods({ + // eslint-disable-next-line complexity async updateIncomingIntegration(integrationId, integration) { if (!this.userId) { throw new Meteor.Error('error-invalid-user', 'Invalid user', { @@ -175,6 +176,7 @@ Meteor.methods({ emoji: integration.emoji, alias: integration.alias, channel: channels, + ...('username' in integration && { username: integration.username }), ...(isFrozen ? {} : {