bot_config: Have check_valid_bot_config also take the bot_type.

This is a prep commit to allow us to validate user provided bot
config data using the same function for incoming webhook type
bots alongside embedded bots (as opposed to creating a new
function just for incoming webhook bots).
This commit is contained in:
Hemanth V. Alluri
2019-08-17 22:36:51 +05:30
committed by Tim Abbott
parent f5c57361d6
commit 94c351ead4
2 changed files with 16 additions and 14 deletions

View File

@@ -321,7 +321,7 @@ def add_bot_backend(
user_profile, default_events_register_stream_name)
if bot_type == UserProfile.EMBEDDED_BOT:
check_valid_bot_config(service_name, config_data)
check_valid_bot_config(bot_type, service_name, config_data)
bot_profile = do_create_user(email=email, password='',
realm=user_profile.realm, full_name=full_name,