diff options
Diffstat (limited to 'app/models/project_services/chat_notification_service.rb')
-rw-r--r-- | app/models/project_services/chat_notification_service.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/project_services/chat_notification_service.rb b/app/models/project_services/chat_notification_service.rb index 7bd011101dd..1ec983223f3 100644 --- a/app/models/project_services/chat_notification_service.rb +++ b/app/models/project_services/chat_notification_service.rb @@ -84,10 +84,11 @@ class ChatNotificationService < Service event_type = data[:event_type] || object_kind - channel_names = get_channel_field(event_type).presence || channel + channel_names = get_channel_field(event_type).presence || channel.presence + channels = channel_names&.split(',')&.map(&:strip) opts = {} - opts[:channel] = channel_names.split(',').map(&:strip) if channel_names + opts[:channel] = channels if channels.present? opts[:username] = username if username return false unless notify(message, opts) |