Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

integrations: Fix duplicate "Bot" suffix in bot names.

harsh_0303600d83ccb9c6
diff --git a/tools/screenshots/generate-integration-docs-screenshot b/tools/screenshots/generate-integration-docs-screenshot
index c4cca165594..34d1bef8752 100755
--- a/tools/screenshots/generate-integration-docs-screenshot
+++ b/tools/screenshots/generate-integration-docs-screenshot
@@ -43,6 +43,7 @@ from zerver.lib.integrations import (
FIXTURELESS_INTEGRATIONS_WITH_SCREENSHOTS,
INCOMING_WEBHOOK_INTEGRATIONS,
INTEGRATIONS,
+ BotIntegration,
FixturelessScreenshotConfig,
IncomingWebhookIntegration,
Integration,
@@ -70,7 +71,10 @@ def create_integration_bot(integration: Integration, bot_name: str | None = None
)
bot_email = f"{email_prefix}[email protected]"
if bot_name is None:
- bot_name = f"{integration.display_name} Bot"
+ if isinstance(integration, BotIntegration):
+ bot_name = integration.display_name
+ else:
+ bot_name = f"{integration.display_name} Bot"
try:
bot = UserProfile.objects.get(email=bot_email)
except UserProfile.DoesNotExist: