some fixes
This commit is contained in:
@@ -142,10 +142,18 @@ class AsyncBotDB:
|
||||
async def get_post_content_from_telegram_by_last_id(self, last_post_id: int) -> List[Tuple[str, str]]:
|
||||
"""Получает контент поста по helper_text_message_id."""
|
||||
return await self.factory.posts.get_post_content_by_helper_id(last_post_id)
|
||||
|
||||
async def get_post_content_by_helper_id(self, helper_message_id: int) -> List[Tuple[str, str]]:
|
||||
"""Алиас для get_post_content_from_telegram_by_last_id (используется callback-сервисом)."""
|
||||
return await self.get_post_content_from_telegram_by_last_id(helper_message_id)
|
||||
|
||||
async def get_post_text_from_telegram_by_last_id(self, last_post_id: int) -> Optional[str]:
|
||||
"""Получает текст поста по helper_text_message_id."""
|
||||
return await self.factory.posts.get_post_text_by_helper_id(last_post_id)
|
||||
|
||||
async def get_post_text_by_helper_id(self, helper_message_id: int) -> Optional[str]:
|
||||
"""Алиас для get_post_text_from_telegram_by_last_id (используется callback-сервисом)."""
|
||||
return await self.get_post_text_from_telegram_by_last_id(helper_message_id)
|
||||
|
||||
async def get_post_ids_from_telegram_by_last_id(self, last_post_id: int) -> List[int]:
|
||||
"""Получает ID сообщений по helper_text_message_id."""
|
||||
@@ -159,15 +167,15 @@ class AsyncBotDB:
|
||||
"""Получает ID автора по helper_text_message_id."""
|
||||
return await self.factory.posts.get_author_id_by_helper_message_id(helper_text_message_id)
|
||||
|
||||
async def update_status_by_message_id(self, message_id: int, status: str) -> None:
|
||||
"""Обновление статуса поста по message_id (одиночные посты)."""
|
||||
await self.factory.posts.update_status_by_message_id(message_id, status)
|
||||
async def update_status_by_message_id(self, message_id: int, status: str) -> int:
|
||||
"""Обновление статуса поста по message_id (одиночные посты). Возвращает число обновлённых строк."""
|
||||
return await self.factory.posts.update_status_by_message_id(message_id, status)
|
||||
|
||||
async def update_status_for_media_group_by_helper_id(
|
||||
self, helper_message_id: int, status: str
|
||||
) -> None:
|
||||
"""Обновление статуса постов медиагруппы по helper_message_id."""
|
||||
await self.factory.posts.update_status_for_media_group_by_helper_id(
|
||||
) -> int:
|
||||
"""Обновление статуса постов медиагруппы по helper_message_id. Возвращает число обновлённых строк."""
|
||||
return await self.factory.posts.update_status_for_media_group_by_helper_id(
|
||||
helper_message_id, status
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user