diff --git a/src/server/model/feed/event.ts b/src/server/model/feed/event.ts index 2a65379..43433a4 100644 --- a/src/server/model/feed/event.ts +++ b/src/server/model/feed/event.ts @@ -68,24 +68,16 @@ export async function sendFeedEventsNotify( }, events: FeedEvent[] ) { - let frequencyToken = token.paragraph('Range: Every Event'); + let frequencyText = 'Single Event'; if (channel.notifyFrequency === FeedChannelNotifyFrequency.day) { - frequencyToken = token.paragraph( - `Range: Daily | ${dayjs().subtract(1, 'day').toISOString()} - ${dayjs().toISOString()}` - ); + frequencyText = `Daily | ${dayjs().subtract(1, 'day').toISOString()} - ${dayjs().toISOString()}`; } else if (channel.notifyFrequency === FeedChannelNotifyFrequency.week) { - frequencyToken = token.paragraph( - `Range: Weekly | ${dayjs().subtract(1, 'week').toISOString()} - ${dayjs().toISOString()}` - ); + frequencyText = `Weekly | ${dayjs().subtract(1, 'week').toISOString()} - ${dayjs().toISOString()}`; } else if (channel.notifyFrequency === FeedChannelNotifyFrequency.month) { - frequencyToken = token.paragraph( - `Range: Monthly | ${dayjs().subtract(1, 'month').toISOString()} - ${dayjs().toISOString()}` - ); + frequencyText = `Monthly | ${dayjs().subtract(1, 'month').toISOString()} - ${dayjs().toISOString()}`; } const eventTokens: ContentToken[] = [ - token.title('Feed Report from Channel: ' + channel.name, 2), - frequencyToken, token.list( events.map((event) => token.text( @@ -97,7 +89,11 @@ export async function sendFeedEventsNotify( await Promise.all( channel.notifications.map((notification) => - sendNotification(notification, 'Feed Report', eventTokens).catch((err) => + sendNotification( + notification, + `Feed Report from Channel: ${channel.name} | ${frequencyText}`, + eventTokens + ).catch((err) => logger.error( '[Notification] sendFeedEventsNotify', channel.id,