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

IncomingWebhook default params overwritten #534

Closed
4 of 9 tasks
franckbrignoli opened this issue Apr 17, 2018 · 0 comments
Closed
4 of 9 tasks

IncomingWebhook default params overwritten #534

franckbrignoli opened this issue Apr 17, 2018 · 0 comments

Comments

@franckbrignoli
Copy link
Contributor

Description

The default params are overwritten after each call to the .send method

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

@slack/client version: 4.1

node version: 8.10

OS version(s):

Steps to reproduce:

import { IncomingWebhook } from '@slack/client';

let incomingHook = new IncomingWebhook(process.env.SLACK_HOOK_URL, {
  channel: 'default-channel',
});

incomingHook.send({
  channel: 'alternative-channel',
  text:    'Hello World!'
});

incomingHook.send('Hello Slack!');

Expected result:

The second message is sent to the default-channel.

Actual result:

The second message has been sent to the alternative-channel

franckbrignoli added a commit to franckbrignoli/node-slack-sdk that referenced this issue Apr 17, 2018
aoberoi added a commit that referenced this issue Apr 17, 2018
fix issue #534: default params must not be overwritten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant