feat(api,userbot,frontend): fetch only new messages in backfill by default
This commit is contained in:
1 parent
6b6edc9a0d
commit
ee63f8b783
9 files changed
+76
-25
No files matched your search
@@ -118,6 +118,16 @@ async def upsert_message( # noqa: PLR0913
|
||||
)
|
||||
|
||||
|
||||
async def max_message_id(
|
||||
pool: asyncpg.Pool, account_id: int, chat_id: int
|
||||
) -> int | None:
|
||||
return await pool.fetchval(
|
||||
"SELECT max(message_id) FROM messages WHERE account_id = $1 AND chat_id = $2",
|
||||
account_id,
|
||||
chat_id,
|
||||
)
|
||||
|
||||
|
||||
async def mark_deleted_box(
|
||||
pool: asyncpg.Pool, account_id: int, message_ids: list[int]
|
||||
) -> None:
|
||||
|
||||
Reference in new issue
Block a user