diff --git a/packages/rocketchat-highlight-words/client/client.js b/packages/rocketchat-highlight-words/client/client.js index aa3c6dc5c32b5..f2174eb38ca59 100644 --- a/packages/rocketchat-highlight-words/client/client.js +++ b/packages/rocketchat-highlight-words/client/client.js @@ -1,5 +1,5 @@ /* - * Hilights is a named function that will process Highlights + * Highlights is a named function that will process Highlights * @param {Object} message - The message object */ import _ from 'underscore'; diff --git a/packages/rocketchat-ui-account/client/accountPreferences.js b/packages/rocketchat-ui-account/client/accountPreferences.js index b96c278edeb73..3a79fb60bd951 100644 --- a/packages/rocketchat-ui-account/client/accountPreferences.js +++ b/packages/rocketchat-ui-account/client/accountPreferences.js @@ -57,7 +57,7 @@ Template.accountPreferences.helpers({ }, highlights() { const userHighlights = RocketChat.getUserPreference(Meteor.user(), 'highlights'); - return userHighlights ? userHighlights.join('\n') : undefined; + return userHighlights ? userHighlights.join(',\n') : undefined; }, desktopNotificationEnabled() { return KonchatNotification.notificationStatus.get() === 'granted' || (window.Notification && Notification.permission === 'granted'); @@ -145,7 +145,7 @@ Template.accountPreferences.onCreated(function() { data.unreadAlert = JSON.parse($('#unreadAlert').find('input:checked').val()); data.notificationsSoundVolume = parseInt($('#notificationsSoundVolume').val()); data.roomCounterSidebar = JSON.parse($('#roomCounterSidebar').find('input:checked').val()); - data.highlights = _.compact(_.map($('[name=highlights]').val().split('\n'), function(e) { + data.highlights = _.compact(_.map($('[name=highlights]').val().split(/,|\n/), function(e) { return s.trim(e); }));