pull/273/head
xiaojunnuo 2024-12-11 11:36:00 +08:00
parent ec79104ad2
commit cdcdb6a2d9
1 changed files with 9 additions and 5 deletions

View File

@ -156,12 +156,16 @@ export class NotificationService extends BaseService<NotificationEntity> {
//发送通知 //发送通知
logger.info('发送通知, 使用通知渠道:' + notifyConfig.name); logger.info('发送通知, 使用通知渠道:' + notifyConfig.name);
let siteTitle = 'Certd'; if (notifyConfig.type != 'email') {
if (isComm()) { //非邮件通知,需要加上站点名称
const siteInfo = await this.sysSettingsService.getSetting<SysSiteInfo>(SysSiteInfo); let siteTitle = 'Certd';
siteTitle = siteInfo?.title || siteTitle; if (isComm()) {
const siteInfo = await this.sysSettingsService.getSetting<SysSiteInfo>(SysSiteInfo);
siteTitle = siteInfo?.title || siteTitle;
}
req.body.title = `${siteTitle}${req.body.title}`;
} }
req.body.title = `${siteTitle}${req.body.title}`;
await sendNotification({ await sendNotification({
config: notifyConfig, config: notifyConfig,
ctx: { ctx: {