pins logic rework

This commit is contained in:
Aevann1 2021-12-26 03:03:21 +02:00
parent f8f285bcee
commit 1a43b0dedc
27 changed files with 300 additions and 310 deletions

View file

@ -218,8 +218,9 @@ def post_id(pid, anything=None, v=None):
comments = comments2
for pin in pinned:
if pin.is_pinned.startswith("t:") and int(time.time()) > int(pin.is_pinned[2:]):
if pin.is_pinned_utc and int(time.time()) > pin.is_pinned_utc:
pin.is_pinned = None
pin.is_pinned_utc = None
g.db.add(pin)
pinned.remove(pin)