Skip to content

Commit 0d20591

Browse files
committed
fix(sub-multi-url sending): only send when some feed sub successfully
1 parent 357dc2e commit 0d20591

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

middlewares/sub-multi-url.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ module.exports = async (ctx, next) => {
4242
}
4343
builder.push(`<a href="${feed.url}">${feed.feed_title}</a>`);
4444
});
45-
ctx.replyWithHTML(builder.join('\n'));
45+
if (builder.length > 1) {
46+
// some feed did sub successfully
47+
ctx.replyWithHTML(builder.join('\n'));
48+
}
4649
await next();
4750
};

0 commit comments

Comments
 (0)