From 8db14a95c12ea5ed4a0f59557ba452181a562946 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Sun, 27 Jun 2021 18:07:56 -0500 Subject: [PATCH] Call reduce.reduce_tweet and session.save_users when retrieving previous items for a buffer --- src/controller/buffers/twitterBuffers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controller/buffers/twitterBuffers.py b/src/controller/buffers/twitterBuffers.py index d44d0b1d..03657e7c 100644 --- a/src/controller/buffers/twitterBuffers.py +++ b/src/controller/buffers/twitterBuffers.py @@ -19,7 +19,7 @@ import languageHandler import logging from audio_services import youtube_utils from controller.buffers import baseBuffers -from sessions.twitter import compose, utils +from sessions.twitter import compose, utils, reduce from mysc.thread_utils import call_threaded from tweepy.error import TweepError from tweepy.cursor import Cursor @@ -231,8 +231,10 @@ class baseBufferController(baseBuffers.buffer): if items == None: return items_db = self.session.db[self.name] + self.session.add_users_from_results(items) for i in items: if utils.is_allowed(i, self.session.settings, self.name) == True and utils.find_item(i.id, self.session.db[self.name]) == None: + i = reduce.reduce_tweet(i) i = self.session.check_quoted_status(i) i = self.session.check_long_tweet(i) elements.append(i)