Improved reply recipients on phone article.

This commit is contained in:
Martin Edenhofer 2017-10-18 02:44:02 +02:00
parent 80ab16a2d3
commit fa83de523e
2 changed files with 4 additions and 3 deletions

View file

@ -932,7 +932,7 @@ class App.Utils
# if sender is customer but in article.from is no email, try to get # if sender is customer but in article.from is no email, try to get
# customers email via customer user # customers email via customer user
if articleNew.to && !articleNew.to.match(/@/) if (articleNew.to && !articleNew.to.match(/@/)) || !articleNew.to
articleNew.to = ticket.customer.email articleNew.to = ticket.customer.email
return articleNew return articleNew

View file

@ -1814,7 +1814,7 @@ test('check getRecipientArticle format', function() {
}, },
} }
result = { result = {
to: '', to: customer.email,
cc: '', cc: '',
body: '', body: '',
in_reply_to: 'message_id2', in_reply_to: 'message_id2',
@ -1839,6 +1839,7 @@ test('check getRecipientArticle format', function() {
sender: { sender: {
name: 'Agent', name: 'Agent',
}, },
from: 'article_created_by@example.com',
created_by: { created_by: {
login: 'login', login: 'login',
firstname: 'firstname', firstname: 'firstname',
@ -1847,7 +1848,7 @@ test('check getRecipientArticle format', function() {
}, },
} }
result = { result = {
to: '', to: customer.email,
cc: '', cc: '',
body: '', body: '',
in_reply_to: 'message_id3', in_reply_to: 'message_id3',