mirror of https://github.com/zulip/zulip.git
tools: Use the correct path for bot avatar to generate screenshots.
This commit is contained in:
parent
788203778d
commit
d2dadde381
|
@ -64,7 +64,9 @@ def create_integration_bot(integration: WebhookIntegration, bot_name: Optional[s
|
|||
)
|
||||
notify_created_bot(bot)
|
||||
|
||||
bot_avatar_path = static_path(integration.DEFAULT_BOT_AVATAR_PATH.format(name=integration.name))
|
||||
bot_avatar_path = integration.get_bot_avatar_path()
|
||||
if bot_avatar_path is not None:
|
||||
bot_avatar_path = static_path(bot_avatar_path)
|
||||
if os.path.isfile(bot_avatar_path):
|
||||
with open(bot_avatar_path, "rb") as f:
|
||||
upload_avatar_image(f, owner, bot)
|
||||
|
|
Loading…
Reference in New Issue