perf: 通知渠道支持测试按钮

This commit is contained in:
xiaojunnuo
2024-11-25 11:35:16 +08:00
parent 3af6d96e6e
commit b54ae272eb
13 changed files with 126 additions and 24 deletions
@@ -93,4 +93,19 @@ export abstract class BaseNotification implements INotification {
}
throw new Error(`action ${req.action} not found`);
}
async onTestRequest() {
await this.send({
userId: 0,
title: "测试通知",
content: "测试通知",
pipeline: {
id: 1,
title: "测试流水线",
} as any,
pipelineId: 1,
historyId: 1,
url: "http://www.baidu.com",
});
}
}