Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(worker): Remove custom Slack provider handling in send-message-chat #6328

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

rifont
Copy link
Contributor

@rifont rifont commented Aug 15, 2024

What changed? Why was the change needed?

  • Remove custom Slack provider handling in sned-message-chat
    • This custom handling was causing Slack block content to duplicate due to the Providers merging feature that was recently introduced. The recent Providers update in feat(api): add usage of bridge provider options in send message usecases a… #6062 means that we no longer need to handle Slack in a custom way, leveraging the transform feature instead
    • The updated code aligns with Bridge provider data handling in send-message-sms and other channels

Screenshots

Before - duplicate Slack blocks content due to blocks mapping to "trigger data"
image

After - no more duplicate messages
image

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

@@ -405,7 +405,7 @@ export class SendMessageChat extends SendMessageBase {
customData: overrides,
webhookUrl: chatWebhookUrl,
channel: channelSpecification,
...(bridgeContent?.content ? bridgeContent : { content }),
content,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We provide the fully resolved content directly to the chatHandler now

@@ -88,7 +88,8 @@ export class SendMessageChat extends SendMessageBase {
step.template = template;
}

let content = '';
const bridgeOutput = command.bridgeData?.outputs as ChatOutput | undefined;
let content: string = bridgeOutput?.body || '';
Copy link
Contributor Author

@rifont rifont Aug 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fully resolving the content here.

@rifont rifont merged commit cfcaa75 into next Aug 15, 2024
24 checks passed
@rifont rifont deleted the fix-slack-providers-framework branch August 15, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants