In case of web form, use also email in from to be able to reply.

This commit is contained in:
Martin Edenhofer 2016-10-06 19:01:28 +02:00
parent 03fed96634
commit 1794b98362

View file

@ -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