This commit is contained in:
2025-06-21 21:47:26 +08:00
parent 29725a8614
commit 71359fba88
3 changed files with 11 additions and 5 deletions

View File

@@ -21,18 +21,20 @@ taskApp
if (res.code === 200) {
const data = res.body;
const unread_count = data.unread_count;
if (unread_count > 0) {
const likes = data.likes;
const unread = unread_count - likes;
if (unread > 0) {
queue.add(
'mention',
{
path: 'task',
key: 'getMention',
payload: {
unread_count,
unread_count: unread,
},
},
{
attempts: 3,
attempts: 1,
delay: 0,
removeOnComplete: true,
removeOnFail: {
@@ -42,7 +44,7 @@ taskApp
);
}
ctx.body = {
job: unread_count,
job: unread,
};
}
})