|
|
@ -44,9 +44,6 @@ class UserNotificationService extends SiteService { |
|
|
|
if (!notificationDefinition.action) { |
|
|
|
throw new SiteError(406, 'Missing action'); |
|
|
|
} |
|
|
|
if (!notificationDefinition.label) { |
|
|
|
throw new SiteError(406, 'Missing label'); |
|
|
|
} |
|
|
|
if (!notificationDefinition.content) { |
|
|
|
throw new SiteError(406, 'Missing content'); |
|
|
|
} |
|
|
@ -128,7 +125,9 @@ class UserNotificationService extends SiteService { |
|
|
|
notification.status = 'new'; |
|
|
|
|
|
|
|
notification.action = striptags(notificationDefinition.action.trim().toLowerCase()); |
|
|
|
if (notificationDefinition.label) { |
|
|
|
notification.label = striptags(notificationDefinition.label.trim()); |
|
|
|
} |
|
|
|
notification.content = striptags(notificationDefinition.content.trim()); |
|
|
|
notification.href = striptags(notificationDefinition.href.trim()); |
|
|
|
|
|
|
|