feat: add annotations, user profiles, watchers, stories, search and more

This commit is contained in:
hh committed 2026-06-01 17:15:09 +02:00
1 parent ed469ba8dd
commit 2465bcd184
47 files changed
+5009 -242

No files matched your search

+14
View File
@@ -68,3 +68,17 @@ async def get_stories(
*params,
)
return [StoryView(**dict(row)) for row in rows]
async def get_story(
pool: asyncpg.Pool, account_id: int, peer_id: int, story_id: int
) -> StoryView | None:
row = await pool.fetchrow(
"SELECT peer_id, story_id, date, expire_date, caption, media_kind, "
"storage_key, downloaded, views, pinned, deleted FROM stories "
"WHERE account_id = $1 AND peer_id = $2 AND story_id = $3",
account_id,
peer_id,
story_id,
)
return StoryView(**dict(row)) if row else None