Closed mhink closed 9 years ago
I haven't tested this locally. But the changes stand to reason. Looks good to me.
One note: there should be a test that would catch this issue.
This bug just caught me. Simply running an example message send would result in failure.
irb(main)> client = HipChat::Client.new "my_token..."
irb(main)> client['Room'].send("Service", "Heyo!")
NoMethodError: undefined method `[]' for nil:NilClass
from /usr/local/rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/hipchat-1.5.0/lib/hipchat/room.rb:122:in `send'
from (irb):2
But, adding the api version explicitly would succeed.
client = HipChat::Client.new "my_token...", api_version: 'v2'
...if options[:api_version] is unset.