feat: toggle reply to on widget based on feature flag (#8261)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Shivam Mishra
2023-10-31 21:33:14 +05:30
committed by GitHub
parent 29f18c7f18
commit b6584ec68b
7 changed files with 25 additions and 5 deletions

View File

@@ -68,6 +68,7 @@ export default {
data() {
return {
inReplyTo: null,
allowReplyTo: window.chatwootWebChannel.allowReplyTo || false,
};
},
computed: {
@@ -90,6 +91,8 @@ export default {
return this.currentUser && this.currentUser.email;
},
hasReplyTo() {
if (!this.allowReplyTo) return false;
return (
this.inReplyTo && (this.inReplyTo.content || this.inReplyTo.attachments)
);