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