inbox-debug-7

This commit is contained in:
2024-01-24 15:26:16 +03:00
parent cccaf16817
commit 751d91562e
2 changed files with 29 additions and 23 deletions

View File

@@ -28,6 +28,7 @@ async def load_messages(
chat_id: str, limit: int = 5, offset: int = 0, ids: Optional[List[int]] = None
):
"""load :limit messages for :chat_id with :offset"""
logger.info("load_messages")
messages = []
try:
message_ids = [] + (ids or [])
@@ -63,6 +64,7 @@ async def load_messages(
@login_required
async def load_chats(_, info, limit: int = 50, offset: int = 0) -> Dict[str, Union[List[Dict[str, Any]], None]]:
"""load :limit chats of current user with :offset"""
logger.info("load_chats")
author_id = info.context["author_id"]
chats = []
try: