Improved stored user identifier.

This commit is contained in:
Martin Edenhofer 2016-02-07 17:17:27 +01:00
parent a304744b3f
commit 1aee8eef09

View file

@ -185,7 +185,11 @@ class Observer::Ticket::Notification::BackgroundJob
def add_recipient_list(ticket, user, channels) def add_recipient_list(ticket, user, channels)
return if channels.empty? return if channels.empty?
recipient_list = "#{user.email}(#{channels.join(',')})" identifier = user.email
if !identifier && identifier == ''
identifier = user.login
end
recipient_list = "#{identifier}(#{channels.join(',')})"
History.add( History.add(
o_id: ticket.id, o_id: ticket.id,
history_type: 'notification', history_type: 'notification',