refactor(stars_bot): remove redundant notification calls

This commit is contained in:
2026-07-29 22:48:35 +05:00
parent 32a319a836
commit 51f6e417bd
-16
View File
@@ -167,28 +167,12 @@ class TelegramStarsBot:
f"Пост {post_id} уже имеет комментарии. Пропускаю обработку."
)
self.processed_manager.mark_processed(post_id)
if self.notification_bot:
await self.notification_bot.failure(
post=post,
reason=f"пост уже имеет комментарии",
post_message_id=post_message_id,
)
return
post_content = post.get("post_body_html") or post.get("post_body")
if not post_content:
logger.warning(f"У поста {post_id} отсутствует содержимое. Пропускаем.")
self.processed_manager.mark_processed(post_id)
if self.notification_bot:
await self.notification_bot.failure(
post=post,
reason=f"у поста отсутствует содержимое",
post_message_id=post_message_id,
)
return
links = TelegramLinkExtractor.extract(post_content)