fix(notification): enhance sendParams structure to include content and scope data (#6164)

This commit is contained in:
Sheldon Guo 2025-02-06 17:47:53 +08:00 committed by GitHub
parent 032b4e4a7f
commit e4c950d2f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,7 +14,13 @@ import { Processor, Instruction, JOB_STATUS, FlowNodeModel } from '@nocobase/plu
export default class extends Instruction {
async run(node: FlowNodeModel, prevJob, processor: Processor) {
const options = processor.getParsedValue(node.config, node.id);
const sendParams = { channelName: options.channelName, message: options, triggerFrom: 'workflow' };
const scope = processor.getScope(node.id);
const sendParams = {
channelName: options.channelName,
message: { ...options, content: node.config.content },
triggerFrom: 'workflow',
data: scope,
};
const notificationServer = this.workflow.pm.get(NotificationsServerPlugin) as NotificationsServerPlugin;
const { workflow } = processor.execution;