@lmcl/ailo-mcp-email 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/email-handler.js +2 -0
- package/package.json +1 -1
- package/src/email-handler.ts +2 -0
package/dist/email-handler.js
CHANGED
|
@@ -198,6 +198,8 @@ export class EmailHandler {
|
|
|
198
198
|
const raw = await this.fetchRaw(opts.uid, folder);
|
|
199
199
|
if (!raw)
|
|
200
200
|
return null;
|
|
201
|
+
// 读取后自动标记为已读,避免每次启动都推送相同邮件
|
|
202
|
+
await this.markRead({ uids: [opts.uid], read: true, folder });
|
|
201
203
|
const from = raw.from?.value?.[0];
|
|
202
204
|
const to = raw.to?.value?.map((v) => v.address).join(", ") ?? "";
|
|
203
205
|
const atts = raw.attachments ?? [];
|
package/package.json
CHANGED
package/src/email-handler.ts
CHANGED
|
@@ -274,6 +274,8 @@ export class EmailHandler implements BridgeHandler {
|
|
|
274
274
|
const folder = opts.folder ?? "INBOX";
|
|
275
275
|
const raw = await this.fetchRaw(opts.uid, folder);
|
|
276
276
|
if (!raw) return null;
|
|
277
|
+
// 读取后自动标记为已读,避免每次启动都推送相同邮件
|
|
278
|
+
await this.markRead({ uids: [opts.uid], read: true, folder });
|
|
277
279
|
const from = raw.from?.value?.[0];
|
|
278
280
|
const to = raw.to?.value?.map((v) => v.address).join(", ") ?? "";
|
|
279
281
|
const atts = (raw as { attachments?: Array<{ filename?: string; contentType?: string; size?: number }> }).attachments ?? [];
|