From afc241e72a9ae86aec3c8646c1d05b135d6db203 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 24 Jan 2015 11:23:00 +0100 Subject: [PATCH] Add email address if not existing to address line. --- app/assets/javascripts/app/controllers/ticket_zoom.js.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee index f02fa22ae..2a6f337b6 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee @@ -1518,6 +1518,11 @@ class ArticleView extends App.Controller else articleNew.to = article.from + # if sender is customer but in article.from is no email, try to get + # customers email via customer user + if articleNew.to && !articleNew.to.match(/@/) + articleNew.to = article.created_by.email + # filter for uniq recipients recipientAddresses = {} recipient = emailAddresses.parseAddressList(articleNew.to)