Skip to content

[portal] 通知通道声明(email/in_app/web_push)+ 品牌继承(GAP-4 of #1294) #1334

@xuyushun441-sys

Description

@xuyushun441-sys

现象

#1294 spec 描述 portal 是「UI 投影」,但 portal 用户接收通知是核心场景,spec 完全没声明。

复现

  1. 客户在 portal 提单 → 客服在 console 回复
  2. 客户怎么知道有回复?email?站内?digest?模板作者得在哪里声明?
  3. spec 只字未提

Workaround

模板在 view/object 上挂触发器手写 email 模板,绕过 portal 元数据,结果 portal 切换主题/品牌时邮件没跟着改。

分阶段建议

M2/M3PortalSchema 新增 notifications:

notifications?: {
  channels: ('email' | 'in_app' | 'web_push' | 'sms')[];
  digestPolicy?: 'realtime' | 'hourly' | 'daily';
  emailFromName?: string;                          // e.g. "Acme Support"
  emailFromAddress?: string;                       // e.g. "support@acme.com"
  emailTemplateRef?: string;                       // 引用现有 EmailTemplate 元数据
  brandedFromTheme?: boolean;                      // logo/颜色继承自 portal.theme
  unsubscribeAllowed?: boolean;
};

绑定到 portal 是因为「同一对象的同一事件,在不同 portal 通知样式可能不同」(客服内部 vs 客户外部)。

验收

  • 客户回复工单 → 客户收到带 portal logo + 颜色的邮件
  • 客户在 in-app 看到红点
  • 客户可关闭某 portal 的通知而不影响其它

关联

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions