mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 03:27:52 +00:00
feat: Disable attachments and emoji picker in the web widget (#1102)
Signed-off-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
@@ -96,6 +96,7 @@ import {
|
||||
hasPressedShift,
|
||||
} from 'shared/helpers/KeyboardHelpers';
|
||||
import { MESSAGE_MAX_LENGTH } from 'shared/helpers/MessageTypeHelper';
|
||||
import inboxMixin from 'shared/mixins/inboxMixin';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -104,7 +105,7 @@ export default {
|
||||
FileUpload,
|
||||
ResizableTextArea,
|
||||
},
|
||||
mixins: [clickaway],
|
||||
mixins: [clickaway, inboxMixin],
|
||||
data() {
|
||||
return {
|
||||
message: '',
|
||||
@@ -148,9 +149,6 @@ export default {
|
||||
this.message.length > this.maxLength
|
||||
);
|
||||
},
|
||||
channelType() {
|
||||
return this.inbox.channel_type;
|
||||
},
|
||||
conversationType() {
|
||||
const { additional_attributes: additionalAttributes } = this.currentChat;
|
||||
const type = additionalAttributes ? additionalAttributes.type : '';
|
||||
@@ -174,29 +172,6 @@ export default {
|
||||
}
|
||||
return MESSAGE_MAX_LENGTH.GENERAL;
|
||||
},
|
||||
isATwitterInbox() {
|
||||
return this.channelType === 'Channel::TwitterProfile';
|
||||
},
|
||||
isAFacebookInbox() {
|
||||
return this.channelType === 'Channel::FacebookPage';
|
||||
},
|
||||
isAWebWidgetInbox() {
|
||||
return this.channelType === 'Channel::WebWidget';
|
||||
},
|
||||
isATwilioSMSChannel() {
|
||||
const { phone_number: phoneNumber = '' } = this.inbox;
|
||||
return (
|
||||
this.channelType === 'Channel::TwilioSms' &&
|
||||
!phoneNumber.startsWith('whatsapp')
|
||||
);
|
||||
},
|
||||
isATwilioWhatsappChannel() {
|
||||
const { phone_number: phoneNumber = '' } = this.inbox;
|
||||
return (
|
||||
this.channelType === 'Channel::TwilioSms' &&
|
||||
phoneNumber.startsWith('whatsapp')
|
||||
);
|
||||
},
|
||||
showFileUpload() {
|
||||
return (
|
||||
this.isAWebWidgetInbox ||
|
||||
|
||||
Reference in New Issue
Block a user