新增TG自定义是否显示文本消息

This commit is contained in:
eoao
2025-10-23 23:55:00 +08:00
parent 7980e6a444
commit a4a1db22e8
8 changed files with 52 additions and 13 deletions

View File

@@ -1,4 +1,6 @@
export default function emailMsgTemplate(email, tgMsgTo, tgMsgFrom) {
import emailUtils from '../utils/email-utils';
export default function emailMsgTemplate(email, tgMsgTo, tgMsgFrom, tgMsgText) {
let template = `<b>${email.subject}</b>`
@@ -18,14 +20,19 @@ export default function emailMsgTemplate(email, tgMsgTo, tgMsgFrom) {
template += `
收件人:\u200B${email.toEmail}`
return template
}
if(tgMsgTo === 'show') {
} else if(tgMsgTo === 'show') {
template += `
收件人:\u200B${email.toEmail}`
}
return template;
if(tgMsgText === 'show') {
template += `
${email.text || emailUtils.htmlToText(email.content)}`
}
return template;
}