Skip to content

Commit

Permalink
When adding a service, generate id if it is not provided (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
eanders-ms committed May 5, 2018
1 parent e3a29cc commit 7b64e97
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 120 deletions.
2 changes: 2 additions & 0 deletions packages/app/main/src/commands.ts
Expand Up @@ -206,6 +206,8 @@ export function registerCommands() {
//---------------------------------------------------------------------------
// Adds or updates an msbot service entry.
CommandRegistry.registerCommand('bot:add-or-update-service', async (serviceType: ServiceType, service: IConnectedService) => {
if (!service.id || !service.id.length)
service.id = uniqueId();
const activeBot = getActiveBot();
const botInfo = activeBot && getBotInfoByPath(activeBot.path);
if (botInfo) {
Expand Down

0 comments on commit 7b64e97

Please sign in to comment.