Skip to content

邮件回复默认只存草稿,直接发出要在设置里打开 - #61

Merged
NginxL merged 2 commits into
mainfrom
feat/mail-draft-default
Dec 4, 2026
Merged

NginxL merged 2 commits into
mainfrom
feat/mail-draft-default

Conversation

@NginxL

@NginxL NginxL commented Dec 4, 2026

Copy link
Copy Markdown
Owner

做了什么

邮件回复工具 matefeishu_mail_reply 改成默认只存草稿。

  • send 默认改为 false。AI 起草的回复,确认卡片第一行写「只存草稿」,批准后草稿进飞书邮箱的草稿箱,回执提示「到飞书邮箱的草稿箱里检查后发出」。
  • 新设置「回复邮件可以直接发出」(mail_send),默认关。只有打开它、且调用时 send=true,才会直接发出;没打开时即使 send=true 也只存草稿,卡片上写明「设置里没有打开「回复邮件可以直接发出」」。
  • 卡片的摘要按实际生效的 send 计算:卡片显示之后再改这个设置,这张卡批准时会被拒绝(「账号或回复信息有变化,邮件没有发出,请重新打开确认卡片」),不执行任何 lark-cli 命令,所以执行的永远和卡片上写的一致。
  • 「飞书邮箱」设置的说明里补上「回复邮件默认只存草稿」。

原因:直接发出需要飞书应用有 mail:user_mailbox.message:send 权限。不开这个权限时,原来默认直接发出的卡片批准后每次都会失败。

没有新增 hub 权限、界面位置或命令行工具;只改了飞书扩展。

怎么验证的

  • bash scripts/test.sh 和 PYTHON=/usr/bin/python3 bash scripts/test.sh 通过。
  • 新增 6 个测试,改动前的代码上都会失败:不传 send 时存草稿;设置关着时 send=true 也存草稿;卡片显示后打开或关掉设置都拒绝执行;schema 和设置的默认值都是 false。

🤖 Generated with Claude Code

NginxL and others added 2 commits December 4, 2026 10:52
matefeishu_mail_reply's `send` now defaults to false. A new setting
`mail_send` (default off) is required before send=true sends the mail;
with it off the card says 只存草稿 and names the setting. The card's
digest covers the effective send, so toggling the setting after a card
was shown refuses that card before any lark-cli command runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NginxL
NginxL merged commit 6776d8e into main Dec 4, 2026
@NginxL
NginxL deleted the feat/mail-draft-default branch December 4, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant