Fix tts check being backwards
This commit is contained in:
parent
701bd0b19f
commit
dddb46a627
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user