fix: send release notes directly to admin DMs only without review channel
This commit is contained in:
@@ -163,9 +163,9 @@ class AdminBotService:
|
||||
)
|
||||
await self.notify_admins(text)
|
||||
|
||||
async def notify_admins(self, text: str):
|
||||
"""Broadcast Persian message to review channel and admin DMs."""
|
||||
if self.review_channel_id:
|
||||
async def notify_admins(self, text: str, include_review_channel: bool = True):
|
||||
"""Broadcast Persian message to admin DMs, and optionally review channel."""
|
||||
if include_review_channel and self.review_channel_id:
|
||||
try:
|
||||
await self.client.send_message(self.review_channel_id, text, parse_mode="html")
|
||||
except Exception as e:
|
||||
@@ -1625,8 +1625,8 @@ class AdminBotService:
|
||||
logger.info("Release notes have not changed since last broadcast. Skipping automatic broadcast.")
|
||||
return
|
||||
|
||||
logger.info(f"Broadcasting new release notes (hash: {current_hash[:8]})...")
|
||||
await self.notify_admins(notes)
|
||||
logger.info(f"Broadcasting new release notes directly to admin DMs (hash: {current_hash[:8]})...")
|
||||
await self.notify_admins(notes, include_review_channel=False)
|
||||
await self.repo.set_setting(
|
||||
"last_broadcast_release_hash",
|
||||
current_hash,
|
||||
|
||||
Reference in New Issue
Block a user