support/ruby/collins-notify/lib/collins_notify/adapter/slack.rb
# slack can both DM users and post to channels
# If the recipient isn't explicitly a user (@username) then we'll assume the string is a channel
slack can both DM users and post to channels
If the recipient isn't explicitly a user (@username) then we'll assume the string is a channel
slack can both DM users and post to channels If the recipient isn ' t explicitly a user ( @username ) then we ' ll assume the string is a channel
def make_channel chan
      @logger.debug "In make_channel, got #{chan}"
      chan.sub(/^(?!#|@)/,'#').downcase.gsub(/ |\./, '_')
    end
def make_channel chan @logger . debug "In make_channel, got #{chan}" chan . sub ( / ^(?!#|@) / , '#' ) . downcase . gsub ( /  | \. / , '_' ) end
slack can both DM users and post to channels
If the recipient isn't explicitly a user (@username) then we'll assume the string is a channel
slack can both DM users and post to channels If the recipient isn ' t explicitly a user ( @username ) then we ' ll assume the string is a channel
# If we are DMing a user (chan looks like @username), do nothing # otherwise, make sure chan starts with a '#', if it doesn't already # channel names must be lowercase, and not contain spaces or periods # I'm going to assume that usernames need the same requirements
chan