mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-29 18:22:53 +00:00
feat: remove feature flag checks for message reply to (#8352)
This commit is contained in:
@@ -114,7 +114,6 @@ import { LocalStorage } from 'shared/helpers/localStorage';
|
||||
|
||||
// constants
|
||||
import { BUS_EVENTS } from 'shared/constants/busEvents';
|
||||
import { FEATURE_FLAGS } from 'dashboard/featureFlags';
|
||||
import { REPLY_POLICY } from 'shared/constants/links';
|
||||
import wootConstants from 'dashboard/constants/globals';
|
||||
import { LOCAL_STORAGE_KEYS } from 'dashboard/constants/localStorage';
|
||||
@@ -285,14 +284,6 @@ export default {
|
||||
return this.currentChat.unread_count || 0;
|
||||
},
|
||||
inboxSupportsReplyTo() {
|
||||
if (
|
||||
!this.isFeatureEnabledonAccount(
|
||||
this.accountId,
|
||||
FEATURE_FLAGS.MESSAGE_REPLY_TO
|
||||
)
|
||||
) {
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
incoming: this.inboxHasFeature(INBOX_FEATURES.REPLY_TO),
|
||||
outgoing: this.inboxHasFeature(INBOX_FEATURES.REPLY_TO_OUTGOING),
|
||||
|
||||
@@ -194,7 +194,6 @@ import {
|
||||
replaceSignature,
|
||||
extractTextFromMarkdown,
|
||||
} from 'dashboard/helper/editorHelper';
|
||||
import { FEATURE_FLAGS } from 'dashboard/featureFlags';
|
||||
|
||||
import { LOCAL_STORAGE_KEYS } from 'dashboard/constants/localStorage';
|
||||
import { LocalStorage } from 'shared/helpers/localStorage';
|
||||
@@ -276,11 +275,7 @@ export default {
|
||||
return (
|
||||
this.inReplyTo?.id &&
|
||||
!this.isPrivate &&
|
||||
this.inboxHasFeature(INBOX_FEATURES.REPLY_TO) &&
|
||||
this.isFeatureEnabledonAccount(
|
||||
this.accountId,
|
||||
FEATURE_FLAGS.MESSAGE_REPLY_TO
|
||||
)
|
||||
this.inboxHasFeature(INBOX_FEATURES.REPLY_TO)
|
||||
);
|
||||
},
|
||||
showRichContentEditor() {
|
||||
|
||||
@@ -16,6 +16,5 @@ export const FEATURE_FLAGS = {
|
||||
TEAM_MANAGEMENT: 'team_management',
|
||||
VOICE_RECORDER: 'voice_recorder',
|
||||
AUDIT_LOGS: 'audit_logs',
|
||||
MESSAGE_REPLY_TO: 'message_reply_to',
|
||||
INSERT_ARTICLE_IN_REPLY: 'insert_article_in_reply',
|
||||
};
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<drag-wrapper
|
||||
class="space-y-2"
|
||||
direction="right"
|
||||
:disabled="!allowReplyTo"
|
||||
@dragged="toggleReply"
|
||||
>
|
||||
<AgentMessageBubble
|
||||
@@ -58,7 +57,6 @@
|
||||
</drag-wrapper>
|
||||
<div class="flex flex-col justify-end">
|
||||
<message-reply-button
|
||||
v-if="allowReplyTo"
|
||||
class="transition-opacity delay-75 opacity-0 group-hover:opacity-100 sm:opacity-0"
|
||||
@click="toggleReply"
|
||||
/>
|
||||
@@ -127,7 +125,6 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
hasImageError: false,
|
||||
allowReplyTo: window.chatwootWebChannel.allowReplyTo || false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -217,7 +214,6 @@ export default {
|
||||
};
|
||||
},
|
||||
hasReplyTo() {
|
||||
if (!this.allowReplyTo) return false;
|
||||
return this.replyTo && (this.replyTo.content || this.replyTo.attachments);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -68,7 +68,6 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
inReplyTo: null,
|
||||
allowReplyTo: window.chatwootWebChannel.allowReplyTo || false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -91,8 +90,6 @@ export default {
|
||||
return this.currentUser && this.currentUser.email;
|
||||
},
|
||||
hasReplyTo() {
|
||||
if (!this.allowReplyTo) return false;
|
||||
|
||||
return (
|
||||
this.inReplyTo && (this.inReplyTo.content || this.inReplyTo.attachments)
|
||||
);
|
||||
|
||||
@@ -11,16 +11,12 @@
|
||||
<div class="flex justify-end gap-1">
|
||||
<div class="flex flex-col justify-end">
|
||||
<message-reply-button
|
||||
v-if="!isInProgress && !isFailed && allowReplyTo"
|
||||
v-if="!isInProgress && !isFailed"
|
||||
class="transition-opacity delay-75 opacity-0 group-hover:opacity-100 sm:opacity-0"
|
||||
@click="toggleReply"
|
||||
/>
|
||||
</div>
|
||||
<drag-wrapper
|
||||
direction="left"
|
||||
:disabled="!allowReplyTo"
|
||||
@dragged="toggleReply"
|
||||
>
|
||||
<drag-wrapper direction="left" @dragged="toggleReply">
|
||||
<user-message-bubble
|
||||
v-if="showTextBubble"
|
||||
:message="message.content"
|
||||
@@ -111,7 +107,6 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
hasImageError: false,
|
||||
allowReplyTo: window.chatwootWebChannel.allowReplyTo || false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -142,7 +137,6 @@ export default {
|
||||
: this.$t('COMPONENTS.MESSAGE_BUBBLE.ERROR_MESSAGE');
|
||||
},
|
||||
hasReplyTo() {
|
||||
if (!this.allowReplyTo) return false;
|
||||
return this.replyTo && (this.replyTo.content || this.replyTo.attachments);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
json.website_channel_config do
|
||||
json.allow_messages_after_resolved @web_widget.inbox.allow_messages_after_resolved
|
||||
json.allow_reply_to @web_widget.inbox.account.feature_enabled?('message_reply_to')
|
||||
json.api_host ENV.fetch('FRONTEND_URL', nil)
|
||||
json.auth_token @token
|
||||
json.avatar_url @web_widget.inbox.avatar_url
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
timezone: '<%= @web_widget.inbox.timezone %>',
|
||||
allowMessagesAfterResolved: <%= @web_widget.inbox.allow_messages_after_resolved %>,
|
||||
disableBranding: <%= @web_widget.inbox.account.feature_enabled?('disable_branding') %>,
|
||||
allowReplyTo: <%= @web_widget.inbox.account.feature_enabled?('message_reply_to') %>
|
||||
}
|
||||
window.chatwootPubsubToken = '<%= @contact_inbox.pubsub_token %>'
|
||||
window.authToken = '<%= @token %>'
|
||||
|
||||
Reference in New Issue
Block a user