This commit is contained in:
parent
a6c5243c06
commit
a2ab5e8473
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -148,5 +148,4 @@ migration/content/**/*.md
|
|||
dev-server.pid
|
||||
backups/
|
||||
poetry.lock
|
||||
.venv
|
||||
.ruff_cache
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import time
|
||||
from typing import List
|
||||
|
||||
from sqlalchemy import select
|
||||
|
@ -94,6 +95,10 @@ async def get_my_followed(_, info):
|
|||
with local_session() as session:
|
||||
author = session.query(Author).filter(Author.user == user_id).first()
|
||||
if author:
|
||||
# update author's last_seen timestamp
|
||||
author.last_seen = time.time()
|
||||
session.add(author)
|
||||
|
||||
authors_query = (
|
||||
select(Author)
|
||||
.join(AuthorFollower, AuthorFollower.follower == Author.id)
|
||||
|
|
Loading…
Reference in New Issue
Block a user