lib/lita/handlers/cricket.rb in lita-cricket-0.0.1 vs lib/lita/handlers/cricket.rb in lita-cricket-0.0.2

- old
+ new

@@ -1,8 +1,11 @@ module Lita module Handlers class Cricket < Handler + # Version + VERSION = '0.0.2' + # Dependencies require 'json' require 'httparty' @@ENDPOINT = 'http://cricscore-api.appspot.com/csa' @@ -186,10 +189,10 @@ end end def subscribe_to_match(response,id) subs = get_my_subscriptions(response) - if (subs && [id]).empty + if (subs && [id]).empty? subs << id resp = set_my_subscriptions(response,subs) response.reply("Subscribed you to match #{id}: #{resp}") end end