chore(notification-manager): update message structure to include receivers in notification log data (#5603)

* feat: include receivers in log data for notification sending

* feat: enhance message structure to include receivers in notification sending

* feat: update message structure to include receivers in notification log data
This commit is contained in:
Sheldon Guo 2024-11-07 09:53:57 +08:00 committed by GitHub
parent 493ee41f3e
commit fa64909414
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,10 +39,11 @@ export class NotificationManager implements NotificationManager {
async send(params: SendOptions) {
this.plugin.logger.info('receive sending message request', params);
const channelsRepo = this.plugin.app.db.getRepository(COLLECTION_NAME.channels);
const messageData = { ...(params.receivers ? { receivers: params.receivers } : {}), ...params.message };
const logData: any = {
triggerFrom: params.triggerFrom,
channelName: params.channelName,
message: params.message,
message: messageData,
};
try {
const channel = await channelsRepo.findOne({ filterByTk: params.channelName });