Skip to content

Commit

Permalink
style: 修改list mode模板格式
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Dec 26, 2024
1 parent ea60cbc commit bc5cb4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/mail/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export async function parseEmail(message: ForwardableEmailMessage, maxSize: numb
cache.html = cache.text;
return cache;
case 'truncate':
emailRaw = truncateStream(message.raw, maxSize);
isTruncate = true;
emailRaw = truncateStream(message.raw, maxSize);
break;
default:
break;
Expand Down
9 changes: 1 addition & 8 deletions src/mail/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ export async function renderEmailListMode(mail: EmailCache, env: Environment): P
OPENAI_API_KEY,
DOMAIN,
} = env;

const text = `
${mail.subject}
-----------
From\t:\t${mail.from}
To\t\t:\t${mail.to}
`;
const text = `${mail.subject}\n\n-----------\nFrom\t:\t${mail.from}\nTo\t\t:\t${mail.to}`;
const preview = `https://${DOMAIN}/email/${mail.id}?mode=text`;
const fullHTML = `https://${DOMAIN}/email/${mail.id}?mode=html`;
const keyboard = [
Expand Down

0 comments on commit bc5cb4d

Please sign in to comment.