From 1aee8eef09f4473581ac391a950c9ae99832591b Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 7 Feb 2016 17:17:27 +0100 Subject: [PATCH] Improved stored user identifier. --- app/models/observer/ticket/notification/background_job.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/observer/ticket/notification/background_job.rb b/app/models/observer/ticket/notification/background_job.rb index 837950b2d..84d459235 100644 --- a/app/models/observer/ticket/notification/background_job.rb +++ b/app/models/observer/ticket/notification/background_job.rb @@ -185,7 +185,11 @@ class Observer::Ticket::Notification::BackgroundJob def add_recipient_list(ticket, user, channels) 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( o_id: ticket.id, history_type: 'notification',