This repository was archived by the owner on Apr 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Cannot use call command #27
Copy link
Copy link
Open
Description
I am trying to use https://github.com/exciting-io/slack-bot-server/blob/master/lib/slack_bot_server/remote_control.rb#L57. My invocation looks like:
server.call(key, 'users.list', [])
When process_instruction handles this, the following occurs:
1: class SlackBotServer::Server
2: def process_instruction(instruction)
=> 3: binding.pry
4: type, *args = instruction
5: bot_key = args.shift
6: if type.to_sym == :add_bot
7: log "adding bot: #{bot_key} #{args.inspect}"
8: add_bot(bot_key, *args)
[1] pry(#<SlackBotServer::Server>)> instruction
=> ["call", ["XXX", "users.list", []]]
[2] pry(#<SlackBotServer::Server>)> type, *args = instruction
=> ["call", ["XXX", "users.list", []]]
[3] pry(#<SlackBotServer::Server>)> args
=> [["XXX", "users.list", []]]
[4] pry(#<SlackBotServer::Server>)> args.shift
=> ["XXX", "users.list", []]
The entire array content is being used for bot_key rather than just the key part of it. The call command fails due to this.
I'm using ruby 2.3.1.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels