mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 20:18:08 +00:00
feat: do not send contact details to the widget (#9223)
* refactor: use has_email instead of email * feat: remove usage of details directly in forms * test: update payload * test: fix transcript test * refactor: use computed hasEmail --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
@@ -87,7 +87,10 @@ export default {
|
||||
return !allowMessagesAfterResolved && status === 'resolved';
|
||||
},
|
||||
showEmailTranscriptButton() {
|
||||
return this.currentUser && this.currentUser.email;
|
||||
return this.hasEmail;
|
||||
},
|
||||
hasEmail() {
|
||||
return this.currentUser && this.currentUser.has_email;
|
||||
},
|
||||
hasReplyTo() {
|
||||
return (
|
||||
@@ -141,12 +144,9 @@ export default {
|
||||
this.inReplyTo = message;
|
||||
},
|
||||
async sendTranscript() {
|
||||
const { email } = this.currentUser;
|
||||
if (email) {
|
||||
if (this.hasEmail) {
|
||||
try {
|
||||
await sendEmailTranscript({
|
||||
email,
|
||||
});
|
||||
await sendEmailTranscript();
|
||||
window.bus.$emit(BUS_EVENTS.SHOW_ALERT, {
|
||||
message: this.$t('EMAIL_TRANSCRIPT.SEND_EMAIL_SUCCESS'),
|
||||
type: 'success',
|
||||
|
||||
Reference in New Issue
Block a user