adminizer 4.3.0-build.95 → 4.3.0-build.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Adminizer.js +12 -2
- package/package.json +1 -1
package/lib/Adminizer.js
CHANGED
|
@@ -233,12 +233,22 @@ export class Adminizer {
|
|
|
233
233
|
// Хелпер для отправки уведомлений
|
|
234
234
|
async sendNotification(notification) {
|
|
235
235
|
const notificationClass = notification.notificationClass || 'general';
|
|
236
|
-
|
|
236
|
+
if (this.config.notifications.enabled) {
|
|
237
|
+
return this.notificationHandler.dispatchNotification(notificationClass, notification);
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
return Promise.resolve(false);
|
|
241
|
+
}
|
|
237
242
|
}
|
|
238
243
|
// Хелпер для системных событий
|
|
239
244
|
async logSystemEvent(title, message, metadata) {
|
|
240
245
|
const systemNotificationService = this.notificationHandler.getService('system');
|
|
241
|
-
|
|
246
|
+
if (this.config.notifications.enabled) {
|
|
247
|
+
return systemNotificationService.logSystemEvent(title, message, 'system', metadata);
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
return Promise.resolve(false);
|
|
251
|
+
}
|
|
242
252
|
}
|
|
243
253
|
// Хелпер для CRUD системных событий
|
|
244
254
|
async logSystemCreatedEvent(title, message, metadata) {
|