This commit is contained in:
Cedric Hoelzl 2020-07-03 11:23:35 +02:00
parent 574273755c
commit 952d71c9eb

View File

@ -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))
)
)
)