From 1794b98362093f42232cf9dea5586331cadc9bf7 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 6 Oct 2016 19:01:28 +0200 Subject: [PATCH] In case of web form, use also email in from to be able to reply. --- app/models/observer/ticket/article/fillup_from_general.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/observer/ticket/article/fillup_from_general.rb b/app/models/observer/ticket/article/fillup_from_general.rb index 30c67eb9e..0f12436d3 100644 --- a/app/models/observer/ticket/article/fillup_from_general.rb +++ b/app/models/observer/ticket/article/fillup_from_general.rb @@ -24,7 +24,11 @@ class Observer::Ticket::Article::FillupFromGeneral < ActiveRecord::Observer return if type['name'] == 'facebook feed comment' return if !record.created_by_id - user = User.find(record.created_by_id) + user = User.find(record.created_by_id) + if type.name == 'web' + record.from = "#{user.firstname} #{user.lastname} <#{user.email}>" + return + end record.from = "#{user.firstname} #{user.lastname}" end end