only save newer tweets, don't override with older

This commit is contained in:
b3yond 2018-09-24 23:16:05 +02:00
parent 2d12aa7107
commit 2a4d517f1d

View file

@ -170,6 +170,7 @@ schlitz
return db.cur.fetchone()[0] return db.cur.fetchone()[0]
def save_seen_tweet(self, tweet_id): def save_seen_tweet(self, tweet_id):
if tweet_id > self.get_seen_tweet():
db.execute("UPDATE seen_tweets SET tweet_id = ? WHERE user_id = ?;", db.execute("UPDATE seen_tweets SET tweet_id = ? WHERE user_id = ?;",
(tweet_id, self.uid)) (tweet_id, self.uid))
db.commit() db.commit()