Fix tts check being backwards

This commit is contained in:
Tim Van Baak 2023-06-19 14:05:29 -07:00
parent 701bd0b19f
commit dddb46a627
1 changed files with 1 additions and 7 deletions

View File

@ -65,12 +65,6 @@ class Item:
def display_title(self):
return self._item.get("title", self._item["id"])
@property
def abs_tts(self):
if "tts" not in self._item:
return None
return self._item["created"] + self._item["tts"]
@property
def can_remove(self):
# The time-to-live fields protects an item from removal until expiry.
@ -94,7 +88,7 @@ class Item:
def before_tts(self):
return (
"tts" in self._item
and self._item["created"] + self._item["tts"] < current_time()
and current_time() < self._item["created"] + self._item["tts"]
)
@property