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

simple.js crashes when slackroom settings are changed #18

Closed
dunn opened this issue Jan 31, 2015 · 0 comments
Closed

simple.js crashes when slackroom settings are changed #18

dunn opened this issue Jan 31, 2015 · 0 comments
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented

Comments

@dunn
Copy link

dunn commented Jan 31, 2015

It looks like the module itself has trouble handling events related to team/admin settings:

  1. Create a bot through the Integrations page.
  2. Add its API token to simple.js
  3. node simple.js
  4. Change (as far as I can tell) any admin setting—for example, add a custom username policy:
/Users/cat/Dropbox/projects/bots/slack/nerd/node_modules/slack-client/src/client.js:546
        return this.team.prefs[message.name] = message.value;
                                             ^
TypeError: Cannot set property 'username_policy' of undefined
    at Client.onMessage (/Users/cat/Dropbox/projects/bots/slack/nerd/node_modules/slack-client/src/client.js:546:46)
    at WebSocket.<anonymous> (/Users/cat/Dropbox/projects/bots/slack/nerd/node_modules/slack-client/src/client.js:142:24)
    at WebSocket.emit (events.js:98:17)
    at Receiver.self._receiver.ontext (/Users/cat/Dropbox/projects/bots/slack/nerd/node_modules/slack-client/node_modules/ws/lib/WebSocket.js:697:10)
    at Receiver.opcodes.1.finish (/Users/cat/Dropbox/projects/bots/slack/nerd/node_modules/slack-client/node_modules/ws/lib/Receiver.js:397:14)
    at Receiver.expectHandler (/Users/cat/Dropbox/projects/bots/slack/nerd/node_modules/slack-client/node_modules/ws/lib/Receiver.js:384:31)
    at Receiver.add (/Users/cat/Dropbox/projects/bots/slack/nerd/node_modules/slack-client/node_modules/ws/lib/Receiver.js:93:24)
    at CleartextStream.firstHandler (/Users/cat/Dropbox/projects/bots/slack/nerd/node_modules/slack-client/node_modules/ws/lib/WebSocket.js:678:22)
    at CleartextStream.emit (events.js:95:17)
    at CleartextStream.<anonymous> (_stream_readable.js:765:14)
@paulhammond paulhammond added the bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented label Feb 3, 2015
@paulhammond paulhammond assigned paulhammond and rharmes and unassigned paulhammond Feb 9, 2015
@rharmes rharmes closed this as completed in 7e7dac7 Feb 9, 2015
aoberoi added a commit to aoberoi/node-slack-sdk that referenced this issue Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented
Projects
None yet
Development

No branches or pull requests

3 participants