fix: make xianyu notifications per-item with clickable links
This commit is contained in:
@@ -137,19 +137,22 @@ app.post('/api/notify-test', async (req, res) => {
|
||||
const task = { id: 'notify-test', name: '通知渠道测试' };
|
||||
const summary = {
|
||||
minScore: Number(config.minScore ?? 75),
|
||||
maxNotifyItems: 1,
|
||||
total: 1,
|
||||
recommendedCount: 1,
|
||||
cautionCount: 0,
|
||||
rejectedCount: 0,
|
||||
reportPath: '这是测试通知,不对应真实报告',
|
||||
topItems: [{
|
||||
id: '1017096975429',
|
||||
title: req.body?.title || 'xianyu-hunter 测试通知',
|
||||
score: 99,
|
||||
verdict: 'recommend',
|
||||
price: '测试',
|
||||
location: '本机',
|
||||
reason: `测试通知渠道:${targetLabel}`,
|
||||
href: '',
|
||||
href: 'https://www.goofish.com/item?id=1017096975429&categoryId=126856267',
|
||||
categoryId: '126856267',
|
||||
}],
|
||||
};
|
||||
const result = await sendNotifications(task, summary, { force: true, config: { ...config, enabled: true, notifyOnlyGood: false } });
|
||||
|
||||
Reference in New Issue
Block a user