From a83a931868f6fb8f9e5ce18efec0f44b9d1092a3 Mon Sep 17 00:00:00 2001 From: Thomas Wolfe Date: Fri, 28 Jul 2017 15:56:37 -0700 Subject: [PATCH] updated intercom auth --- app/controllers/conversations_controller.rb | 2 +- app/helpers/intercom_helper.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/conversations_controller.rb b/app/controllers/conversations_controller.rb index 2c9e57c..1719946 100644 --- a/app/controllers/conversations_controller.rb +++ b/app/controllers/conversations_controller.rb @@ -16,7 +16,7 @@ def index end #check intercom authorization begin - intercom = Intercom::Client.new(app_id: ENV['INTERCOM_KEY'], api_key: ENV['INTERCOM_SECRET']) + intercom = Intercom::Client.new(token: ENV['INTERCOM_ACCESS_TOKEN']); intercom.admins.all.first @intercom_auth = true rescue diff --git a/app/helpers/intercom_helper.rb b/app/helpers/intercom_helper.rb index ca586a5..d8029ed 100644 --- a/app/helpers/intercom_helper.rb +++ b/app/helpers/intercom_helper.rb @@ -5,7 +5,8 @@ module IntercomHelper # @param [Array] conversation_ids - the intercom conversation ids # @return [Hash] def self.find_tags conversation_ids - intercom = Intercom::Client.new(app_id: ENV['INTERCOM_KEY'], api_key: ENV['INTERCOM_SECRET']) + intercom = Intercom::Client.new(token: ENV['INTERCOM_ACCESS_TOKEN']); + tags = {}