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

Subscribing to private messages is broken #9

Open
shepwalker opened this issue Jun 15, 2015 · 1 comment
Open

Subscribing to private messages is broken #9

shepwalker opened this issue Jun 15, 2015 · 1 comment

Comments

@shepwalker
Copy link

Using the Slack Adapter for Hubot, whenever I try to subscribe to an event via a private message, the emit fails.

Debug messages:

[Thu Jun 11 2015 21:36:15 GMT+0000 (Coordinated Universal Time)] DEBUG Sending to C02FZLYR6: testevent1: blerg
[Thu Jun 11 2015 21:36:17 GMT+0000 (Coordinated Universal Time)] ERROR TypeError: Cannot call method 'send' of undefined
  at SlackBot.send (D:\home\site\wwwroot\node_modules\hubot-slack\src\slack.coffee:206:17)
  at Robot.send (D:\home\site\wwwroot\node_modules\hubot\src\robot.coffee:404:5)
  at notify (D:\home\site\wwwroot\node_modules\hubot-pubsub\src\pubsub.coffee:67:15)
  at TextListener.callback (D:\home\site\wwwroot\node_modules\hubot-pubsub\src\pubsub.coffee:132:13)
  at TextListener.Listener.call (D:\home\site\wwwroot\node_modules\hubot\src\listener.coffee:27:8)
  at Robot.receive (D:\home\site\wwwroot\node_modules\hubot\src\robot.coffee:197:31)
  at SlackBot.Adapter.receive (D:\home\site\wwwroot\node_modules\hubot\src\adapter.coffee:66:12)
  at SlackBot.message (D:\home\site\wwwroot\node_modules\hubot-slack\src\slack.coffee:154:8)
  at Client.<anonymous> (D:\home\site\wwwroot\node_modules\hubot-slack\src\slack.coffee:1:1)
  at Client.emit (events.js:95:17)
  at Client.onMessage (D:\home\site\wwwroot\node_modules\hubot-slack\node_modules\slack-client\src\client.js:477:14)
  at WebSocket.<anonymous> (D:\home\site\wwwroot\node_modules\hubot-slack\node_modules\slack-client\src\client.js:140:24)
  at WebSocket.emit (events.js:98:17)
  at Receiver.self._receiver.ontext (D:\home\site\wwwroot\node_modules\hubot-slack\node_modules\slack-client\node_modules\ws\lib\WebSocket.js:697:10)
  at Receiver.opcodes.1.finish (D:\home\site\wwwroot\node_modules\hubot-slack\node_modules\slack-client\node_modules\ws\lib\Receiver.js:397:14)
  at Receiver.expectHandler (D:\home\site\wwwroot\node_modules\hubot-slack\node_modules\slack-client\node_modules\ws\lib\Receiver.js:384:31)
  at Receiver.add (D:\home\site\wwwroot\node_modules\hubot-slack\node_modules\slack-client\node_modules\ws\lib\Receiver.js:93:24)
  at CleartextStream.firstHandler (D:\home\site\wwwroot\node_modules\hubot-slack\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:764:14)
  at CleartextStream.emit (events.js:92:17)
  at emitReadable_ (_stream_readable.js:426:10)
  at _stream_readable.js:419:7
  at process._tickCallback (node.js:419:13)

Trying my hand at coffeescript debugging to understand what's going on but haven't had much luck.

@spajus
Copy link
Owner

spajus commented Jun 17, 2015

From the stack trace it fails when performing robot.send(user, message). Got to investigate how Slack adapter handles private messages.

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

2 participants