Respect filters also when getting previous items

This commit is contained in:
Manuel Cortez 2025-03-03 12:00:33 -06:00
parent 3dae674c4e
commit fccabf6eb5
2 changed files with 6 additions and 0 deletions

View File

@ -157,6 +157,9 @@ class BaseBuffer(base.Buffer):
items_db = self.session.db[self.name]
for i in items:
if utils.find_item(i, self.session.db[self.name]) == None:
filter_status = utils.evaluate_filters(post=i, current_context=utils.get_current_context(self.name))
if filter_status == "hide":
continue
elements.append(i)
if self.session.settings["general"]["reverse_timelines"] == False:
items_db.insert(0, i)

View File

@ -56,6 +56,9 @@ class MentionsBuffer(BaseBuffer):
items_db = self.session.db[self.name]
for i in items:
if utils.find_item(i, self.session.db[self.name]) == None:
filter_status = utils.evaluate_filters(post=i, current_context=utils.get_current_context(self.name))
if filter_status == "hide":
continue
elements.append(i)
if self.session.settings["general"]["reverse_timelines"] == False:
items_db.insert(0, i)