lib/messenger/messenger.rb in messenger-0.6.0 vs lib/messenger/messenger.rb in messenger-0.7.0
- old
+ new
@@ -36,18 +36,20 @@
case url
when /\Ahttp/ then :http
when /\Acampfire/ then :campfire
when /\Ajabber/ then :jabber
when /\Amailto|@+/ then :email
+ when /\Aslack/ then :slack
end
end
def self.handler(url)
case protocol(url)
when :email then Messenger::Email
when :http then Messenger::Web
when :campfire then Messenger::Campfire
when :jabber then Messenger::Jabber
+ when :slack then Messenger::Slack
else
raise Messenger::ProtocolError, "Malformed service URL: #{url}. Either this syntax is wrong or this service type is not yet implemented."
end
end