From 607fc257235d3ca4278a7b5e1c6a3302bef89eb9 Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Wed, 5 Feb 2020 11:56:33 +0530 Subject: [PATCH] Bugfix: Fix copy in agent availability status (#466) Copy update for agent status --- app/javascript/widget/helpers/specs/utils.spec.js | 2 +- app/javascript/widget/helpers/utils.js | 3 +-- config/initializers/twitter.rb | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/javascript/widget/helpers/specs/utils.spec.js b/app/javascript/widget/helpers/specs/utils.spec.js index 5c9312c33..b9bc16d34 100644 --- a/app/javascript/widget/helpers/specs/utils.spec.js +++ b/app/javascript/widget/helpers/specs/utils.spec.js @@ -10,7 +10,7 @@ describe('#getAvailableAgentsText', () => { it('returns the correct text is there are two online agents', () => { expect( getAvailableAgentsText([{ name: 'Pranav' }, { name: 'Nithin' }]) - ).toEqual('Pranav and Nithin is available'); + ).toEqual('Pranav and Nithin are available'); }); it('returns the correct text is there are more than two online agents', () => { diff --git a/app/javascript/widget/helpers/utils.js b/app/javascript/widget/helpers/utils.js index 27dab35cb..e8e61c98f 100755 --- a/app/javascript/widget/helpers/utils.js +++ b/app/javascript/widget/helpers/utils.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ export const isEmptyObject = obj => Object.keys(obj).length === 0 && obj.constructor === Object; @@ -28,7 +27,7 @@ export const getAvailableAgentsText = (agents = []) => { if (count === 2) { const [first, second] = agents; - return `${first.name} and ${second.name} is available`; + return `${first.name} and ${second.name} are available`; } const [agent] = agents; diff --git a/config/initializers/twitter.rb b/config/initializers/twitter.rb index f6711da03..9fabcbeb8 100644 --- a/config/initializers/twitter.rb +++ b/config/initializers/twitter.rb @@ -4,5 +4,5 @@ $twitter = Twitty::Facade.new do |config| config.access_token = ENV.fetch('TWITTER_ACCESS_TOKEN', nil) config.access_token_secret = ENV.fetch('TWITTER_ACCESS_TOKEN_SECRET', nil) config.base_url = 'https://api.twitter.com' - config.environment = 'chatwootstaging' + config.environment = ENV.fetch('TWITTER_ENVIRONMENT', '') end