code: function findDuplicateMessage(notificationArray, newNotification) {
          if (!isPlainTextNotification(newNotification)) {
            return null;
          }
  
          var filteredNotifications = Tools.grep(notificationArray, function (notification) {
            return isSameNotification(newNotification, notification);
          });
  
          return filteredNotifications.length === 0 ? null : filteredNotifications[0];
        }
docs: Finds any existing notification with the same properties as the new one.
  Returns either the found notification or null.
  
  @param {Notification[]} notificationArray - Array of current notifications
  @param {type: string, } newNotification - New notification object
  @returns {?Notification}