From 952d71c9eb3baeddc3bcfa35bbc50e8179592963 Mon Sep 17 00:00:00 2001 From: Cedric Hoelzl Date: Fri, 3 Jul 2020 11:23:35 +0200 Subject: [PATCH] kk --- config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 4cc73f3..ff5fd3d 100644 --- a/config.js +++ b/config.js @@ -63,7 +63,7 @@ module.exports = function(rssi){ Promise.all(articles.map(art=> this.bot.telegram.sendMessage(entry.chat,article_to_mess(art),{"parse_mode":"Markdown"}) )).then(rr=> - db.set_v(entry.chat,parseInt(articles.pop().guid)) + (articles.length == 0) || db.set_v(entry.chat,parseInt(articles.pop().guid)) ) ) ) @@ -98,7 +98,7 @@ module.exports = function(rssi){ Promise.all(articles.map(art=> this.bot.telegram.sendMessage(entry.chat,article_to_mess(art),{"parse_mode":"Markdown"}) )).then(rr=> - db.set_v(entry.chat,parseInt(articles.pop().guid)) + (articles.length == 0) || db.set_v(entry.chat,parseInt(articles.pop().guid)) ) ) )