lib/slack/smart-bot/treat_message.rb in slack-smart-bot-1.12.5 vs lib/slack/smart-bot/treat_message.rb in slack-smart-bot-1.12.6

- old
+ new

@@ -248,10 +248,11 @@ (typem == :on_call and data.files[0].filetype == "ruby")) res = Faraday.new("https://files.slack.com", headers: { "Authorization" => "Bearer #{config[:token]}" }).get(data.files[0].url_private) command += " ruby" if command != "ruby" command = "#{command} #{res.body.to_s.force_encoding("UTF-8")}" end + if typem == :on_call command = "!" + command unless command[0] == "!" or command.match?(/^\s*$/) or command[0] == "^" #todo: add pagination for case more than 1000 channels on the workspace channels = get_channels() @@ -281,9 +282,10 @@ process_first(user_info, command, dest, data.channel, typem, data.files, data.ts, data.thread_ts, data.routine, data.routine_name, data.routine_type, command_orig) # if @botname on #channel_rules: do something elsif typem == :on_pub or typem == :on_pg process_first(user_info, command, dest, channel_rules, typem, data.files, data.ts, data.thread_ts, data.routine, data.routine_name, data.routine_type, command_orig) end + rescue Exception => stack @logger.fatal stack end else