mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-07 22:49:26 +08:00
Add some log to notification manager (#5546)
This commit is contained in:
parent
de31153aa4
commit
4bb9cdd141
@ -61,13 +61,15 @@ export class NotificationManager implements NotificationManager {
|
||||
return logData;
|
||||
} catch (error) {
|
||||
logData.status = 'failure';
|
||||
logData.reason = error.reason;
|
||||
this.plugin.logger.error('notification send failed', JSON.stringify(error));
|
||||
logData.reason = JSON.stringify(error);
|
||||
this.createSendingRecord(logData);
|
||||
return logData;
|
||||
}
|
||||
}
|
||||
async sendToUsers(options: SendUserOptions) {
|
||||
const { userIds, channels, message, data } = options;
|
||||
this.plugin.logger.info('notificationManager.sendToUsers options', JSON.stringify(options));
|
||||
return await Promise.all(
|
||||
channels.map((channelName) =>
|
||||
this.send({ channelName, message, triggerFrom: 'sendToUsers', receivers: { value: userIds, type: 'userId' } }),
|
||||
|
Loading…
x
Reference in New Issue
Block a user