Skip to content

草稿首次发布不会触发订阅邮件通知 #2818

Description

@Jaaayden

Describe the bug

环境

Core v14.8.0

复现步骤

  1. 创建一篇新文章草稿(我的场景是通过 CLI 创建)。
  2. 在管理后台打开草稿,将文章首次发布。
  3. 文章正常上线,但订阅读者没有收到新文章邮件。

代码排查线索

根据 v14.8.0 对应源码:

  • PublishService 先创建 isPublished: false 的文章,再通过 updateById 将其设为已发布。
  • 创建阶段的 post.create 仅发送到系统作用域。
  • 从未发布变为已发布时,PostService 发出 post.republish
  • SubscribeService 仅监听访客作用域的 post.createnote.create,没有监听 post.republish

因此,草稿首次发布似乎没有触发订阅邮件处理器。

直接监听所有 post.republish 可能会让撤回后重新发布的旧文章重复发送邮件,希望能区分首次发布与再次发布。

Reproduction

利用 AI 通过 CLI 创建一篇草稿文章,在管理后台人工审核修改后进行发布,订阅读者不会收到邮件。

System Info

Core: @mx-space/core 14.8.0
Admin: Core 14.8.0 自带版本
部署方式: Docker,innei/mx-server:latest
API Base: /api/v3

Node.js: 26.7.0
pnpm: 11.25.0

API 根接口返回:
  name: @mx-space/core
  version: 14.8.0

https://xxu.do/v3

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions