dsh-conversation-recycle-bin 0.3.1 → 0.3.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to `dsh-conversation-recycle-bin` are documented here.
4
4
  The format follows Keep a Changelog; the project uses Semantic Versioning.
5
5
 
6
+ ## [0.3.2] — 2026-10-18
7
+
8
+ ### Fixed
9
+
10
+ - **`feedback.visitorAsFrom` 在 HTTP 通道静默失效**:HTTP 通道此前固定发送配置的 `from`(未配置则省略字段),`visitorAsFrom: true` 只在 SMTP 通道生效。现在 HTTP 通道同样在显式开启且访客填写了邮箱时把访客邮箱作为 `From`;默认配置下发送的请求体逐字节不变。
11
+ - **邮件正文把访客邮箱标注为发件人**:正文上下文里的 `from / 发件人` 行改为如实的 `visitor / 访客邮箱`。此前无论 `visitorAsFrom` 是否开启,该行都把访客邮箱标成发件人,与真实 `From`(发信账号或访客邮箱)不符;`reply-to` 行保留不变。
12
+
6
13
  ## [0.3.1] — 2026-10-18
7
14
 
8
15
  ### Added
@@ -279,7 +279,7 @@ export function renderFeedbackMessage(submission, { at = Date.now() } = {}) {
279
279
  '---- 自动附带 / attached automatically ----',
280
280
  ` plugin: dsh-conversation-recycle-bin ${PLUGIN_VERSION}`,
281
281
  ...contextLines,
282
- ` from / 发件人: ${submission.email ?? '(anonymous)'}`,
282
+ ` visitor / 访客邮箱: ${submission.email ?? '(anonymous)'}`,
283
283
  ` reply-to: ${submission.email ?? '(none)'}`,
284
284
  ` at: ${new Date(at).toISOString()}`,
285
285
  ]
@@ -331,7 +331,7 @@ export function createFeedbackService({ config, env = process.env, now = Date.no
331
331
  const headers = { 'content-type': 'application/json' }
332
332
  if (settings.apiToken !== '') headers[settings.authHeader.toLowerCase()] = `Bearer ${settings.apiToken}`
333
333
  const body = {
334
- from: settings.from === '' ? undefined : settings.from,
334
+ from: (settings.visitorAsFrom === true && submission.email) ? submission.email : (settings.from === '' ? undefined : settings.from),
335
335
  to: [settings.to],
336
336
  subject: message.subject,
337
337
  text: message.text,
package/lib/version.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * asserted against it by `test/manifest.test.mjs` so the two can never drift
6
6
  * (they did: the constant stayed at 0.1.0 while the package reached 0.1.4).
7
7
  */
8
- export const PLUGIN_VERSION = '0.3.1'
8
+ export const PLUGIN_VERSION = '0.3.2'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-conversation-recycle-bin",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "DSH conversation deletion with an optional, previewed cascade into conversation-associated memory: soft delete + recycle bin, audit trail, batch rate limits and per-session rollback. 删除对话(可选一并删除关联记忆):软删除与回收站、审计留痕、批量限流、失败回滚。",
5
5
  "repository": {
6
6
  "type": "git",