Feat: Manage conversation for tweets based on the tweet flag (#3353)

Add tweet conversation only if tweets are enabled.

Fixes #1961
This commit is contained in:
Tejaswini Chile
2021-12-16 00:24:50 +05:30
committed by GitHub
parent e2e459a1ac
commit 9984edd3ef
12 changed files with 73 additions and 17 deletions

View File

@@ -47,7 +47,10 @@
},
"TWITTER": {
"HELP": "To add your Twitter profile as a channel, you need to authenticate your Twitter Profile by clicking on 'Sign in with Twitter' ",
"ERROR_MESSAGE": "There was an error connecting to Twitter, please try again"
"ERROR_MESSAGE": "There was an error connecting to Twitter, please try again",
"TWEETS": {
"ENABLE": "Create conversations from mentioned Tweets"
}
},
"WEBSITE_CHANNEL": {
"TITLE": "Website channel",

View File

@@ -32,6 +32,14 @@
:label="inboxNameLabel"
:placeholder="inboxNamePlaceHolder"
/>
<label for="toggle-business-hours" class="toggle-input-wrap" v-if="isATwitterInbox">
<input
v-model="tweetsEnabled"
type="checkbox"
name="toggle-business-hours"
/>
{{ $t('INBOX_MGMT.ADD.TWITTER.TWEETS.ENABLE') }}
</label>
<woot-input
v-if="isAPIInbox"
v-model.trim="webhookUrl"
@@ -401,6 +409,7 @@ export default {
avatarUrl: '',
selectedAgents: [],
greetingEnabled: true,
tweetsEnabled: true,
hmacMandatory: null,
greetingMessage: '',
autoAssignment: false,
@@ -564,6 +573,7 @@ export default {
this.selectedInboxName = this.inbox.name;
this.webhookUrl = this.inbox.webhook_url;
this.greetingEnabled = this.inbox.greeting_enabled || false;
this.tweetsEnabled = this.inbox.tweets_enabled || false;
this.hmacMandatory = this.inbox.hmac_mandatory || false;
this.greetingMessage = this.inbox.greeting_message || '';
this.autoAssignment = this.inbox.enable_auto_assignment;
@@ -622,6 +632,7 @@ export default {
selectedFeatureFlags: this.selectedFeatureFlags,
reply_time: this.replyTime || 'in_a_few_minutes',
hmac_mandatory: this.hmacMandatory,
tweets_enabled: this.tweetsEnabled,
},
};
if (this.avatarFile) {