Filters will work in main buffers too. #102

This commit is contained in:
Manuel Cortez 2017-11-20 01:10:25 -06:00
parent 5f7f176892
commit e303d914fe

View File

@ -27,10 +27,11 @@ class streamer(TwythonStreamer):
def put_data(self, place, data): def put_data(self, place, data):
if self.session.db.has_key(place): if self.session.db.has_key(place):
if utils.find_item(data["id"], self.session.db[place]) != None and utils.is_allowed(data, self.session.settings, place): if utils.find_item(data["id"], self.session.db[place]) != None:
log.error("duplicated tweet. Ignoring it...") log.error("duplicated tweet. Ignoring it...")
return False return False
# try: # try:
if utils.is_allowed(data, self.session.settings, place):
data_ = self.session.check_quoted_status(data) data_ = self.session.check_quoted_status(data)
data_ = self.session.check_long_tweet(data_) data_ = self.session.check_long_tweet(data_)
data = data_ data = data_
@ -42,6 +43,7 @@ class streamer(TwythonStreamer):
self.session.db[place].insert(0, data) self.session.db[place].insert(0, data)
utils.is_audio(data) utils.is_audio(data)
return True return True
return False
def block_user(self, data): def block_user(self, data):
id = data["target"]["id"] id = data["target"]["id"]