diff --git a/api-template.json b/api-template.json index bee21b0c1..db557c88b 100644 --- a/api-template.json +++ b/api-template.json @@ -7,7 +7,7 @@ }, "servers": [ { - "url": "https://gb.pragmatismo.com.br/api", + "url": "https://generalbots.online/api", "description": "General Bots Online" } ] diff --git a/packages/core.gbapp/dialogs/WelcomeDialog.ts b/packages/core.gbapp/dialogs/WelcomeDialog.ts index bd8d8fda4..e154ae54c 100644 --- a/packages/core.gbapp/dialogs/WelcomeDialog.ts +++ b/packages/core.gbapp/dialogs/WelcomeDialog.ts @@ -65,8 +65,7 @@ export class WelcomeDialog extends IGBDialog { async step => { if ( GBServer.globals.entryPointDialog !== null && - min.instance.botId === GBConfigService.get('BOT_ID') && - step.context.activity.channelId === 'webchat' + min.instance.botId === GBConfigService.get('BOT_ID') ) { return step.replaceDialog(GBServer.globals.entryPointDialog); } diff --git a/packages/core.gbapp/services/GBDeployer.ts b/packages/core.gbapp/services/GBDeployer.ts index 032569362..d7633602c 100644 --- a/packages/core.gbapp/services/GBDeployer.ts +++ b/packages/core.gbapp/services/GBDeployer.ts @@ -258,7 +258,8 @@ export class GBDeployer implements IGBDeployer { // Makes available bot to the channels and .gbui interfaces. - await GBServer.globals.minService.mountBot(instance); + const min = await GBServer.globals.minService.mountBot(instance); + GBServer.globals.minInstances.push(min); // Creates remaining objects on the cloud and updates instance information. diff --git a/packages/core.gbapp/services/GBMinService.ts b/packages/core.gbapp/services/GBMinService.ts index 72eea1dfd..01bdad2f9 100644 --- a/packages/core.gbapp/services/GBMinService.ts +++ b/packages/core.gbapp/services/GBMinService.ts @@ -1119,10 +1119,10 @@ export class GBMinService { step.context.activity.locale = 'pt-BR'; const sec = new SecService(); let member = context.activity.recipient; - + if (context.activity.type === 'conversationUpdate') { if (context.activity.membersAdded && context.activity.membersAdded.length > 0 && - context.activity.membersAdded[0].id === context.activity.recipient.id) { + context.activity.membersAdded[0].id === context.activity.recipient.id) { GBLogEx.info(min, `Bot added to conversation: ${member.name}`); return; @@ -1209,12 +1209,18 @@ export class GBMinService { await sec.updateConversationReferenceById(userId, conversationReference); if (step.context.activity.channelId !== 'msteams') { + + const service = new KBService(min.core.sequelize); const data = await service.getFaqBySubjectArray(min.instance.instanceId, 'faq', undefined); - await min.conversationalService.sendEvent(min, step, 'play', { - playerType: 'bullet', - data: data.slice(0, 10) - }); + if (data.length > 0) { + await min.conversationalService.sendEvent(min, step, 'play', { + playerType: 'bullet', + data: data.slice(0, 10) + }); + + + } } } @@ -1278,12 +1284,8 @@ export class GBMinService { if (context.activity.type === 'installationUpdate') { GBLogEx.info(min, `Bot installed on Teams.`); - } else if (context.activity.type === 'conversationUpdate' && - context.activity.membersAdded.length > 0) { - // Check if a bot or a human participant is being added to the conversation. - - const member = context.activity.membersAdded[0]; - + } else if (context.activity.type === 'conversationUpdate' ){ + // Calls onNewSession event on each .gbapp package. await CollectionUtil.asyncForEach(appPackages, async e => { diff --git a/packages/default.gbui/public/images/generalbots-transparent.png b/packages/default.gbui/public/images/generalbots-transparent.png new file mode 100644 index 000000000..32f12dd10 Binary files /dev/null and b/packages/default.gbui/public/images/generalbots-transparent.png differ diff --git a/packages/saas.gbapp/dialog/NewUserDialog.ts b/packages/saas.gbapp/dialog/NewUserDialog.ts index 4eb10dc25..a79ad250e 100644 --- a/packages/saas.gbapp/dialog/NewUserDialog.ts +++ b/packages/saas.gbapp/dialog/NewUserDialog.ts @@ -13,9 +13,9 @@ export class NewUserDialog extends IGBDialog { waterfall: [ async step => { await step.context.sendActivity('Please choose your plan:'); - await step.context.sendActivity('1. Free - $0/month (basic features)'); - await step.context.sendActivity('2. Personal - $50/month (more features)'); - await step.context.sendActivity('3. Professional - $150/month (advanced features)'); + await step.context.sendActivity('1 Free - $0/month (basic features)'); + await step.context.sendActivity('2 Personal - $50/month (more features)'); + await step.context.sendActivity('3 Professional - $150/month (advanced features)'); return await step.prompt('textPrompt', 'Enter 1, 2 or 3 to select your plan:'); }, async step => { diff --git a/packages/saas.gbapp/strings.ts b/packages/saas.gbapp/strings.ts index d092b5304..bce3bc4e0 100755 --- a/packages/saas.gbapp/strings.ts +++ b/packages/saas.gbapp/strings.ts @@ -10,7 +10,7 @@ export const Messages = { validation_enter_valid_botname: 'Please enter a valid Bot Name.', validation_enter_valid_voucher: 'Please enter a valid voucher code.', welcome: - "Welcome and let's create your Bot. Also visit: https://gb.pragmatismo.com.br/privacy.html to learn more about our privacy policy.", + "Welcome and let's create your Bot. Also visit: https://pragmatismo.com.br/privacy and https://pragmatismo.com.br/terms to learn more about our privacy policy and terms of use.", whats_botname: "What's the Bot name?", thanks_payment: 'Thanks for choosing paying for General Bots.', boleto_mail: 'Boleto will be e-mailed to you.' diff --git a/templates/default.gbai/default.gbtheme/css/default.css b/templates/default.gbai/default.gbtheme/css/default.css index 8b19df9b4..56b32aa55 100644 --- a/templates/default.gbai/default.gbtheme/css/default.css +++ b/templates/default.gbai/default.gbtheme/css/default.css @@ -163,7 +163,16 @@ screen and (min-width: 420px) and (max-width: 1000px) { /* Player */ .player { - background-color: var(--color-player-background); + background-color: white;; + background-image: url('/themes/default.gbtheme/images/generalbots-2018.ai.svg'); + background-position: center; + background-repeat: no-repeat; + background-size: 90% 90%; + + width: 100%; + height: 100%; + + box-shadow: 0 4px 15px rgba(var(--color-shadow), 0.3); border-radius: 0.75rem; border: 7px solid var(--color-border); diff --git a/templates/default.gbai/default.gbtheme/images/bot-logo-chat.png b/templates/default.gbai/default.gbtheme/images/bot-logo-chat.png deleted file mode 100644 index eff66af38..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/bot-logo-chat.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/bot-logo.png b/templates/default.gbai/default.gbtheme/images/bot-logo.png deleted file mode 100644 index 68f43a6c2..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/bot-logo.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/bot-tv-on.png b/templates/default.gbai/default.gbtheme/images/bot-tv-on.png deleted file mode 100644 index 3dc4d075c..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/bot-tv-on.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/bot-tv-on2.png b/templates/default.gbai/default.gbtheme/images/bot-tv-on2.png deleted file mode 100644 index 3feffa666..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/bot-tv-on2.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/bot-tv.png b/templates/default.gbai/default.gbtheme/images/bot-tv.png deleted file mode 100644 index ddb76e8cc..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/bot-tv.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/chat-background.png b/templates/default.gbai/default.gbtheme/images/chat-background.png deleted file mode 100644 index df3a0645a..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/chat-background.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/chat-header-logo.png b/templates/default.gbai/default.gbtheme/images/chat-header-logo.png deleted file mode 100644 index 60a4b6cba..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/chat-header-logo.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/chat-header.png b/templates/default.gbai/default.gbtheme/images/chat-header.png deleted file mode 100644 index 12375d904..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/chat-header.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/general-bot-background.jpg b/templates/default.gbai/default.gbtheme/images/general-bot-background.jpg deleted file mode 100644 index 1dfb7e6d6..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/general-bot-background.jpg and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/generalbots-2018.ai.svg b/templates/default.gbai/default.gbtheme/images/generalbots-2018.ai.svg new file mode 100644 index 000000000..e5e96a49f --- /dev/null +++ b/templates/default.gbai/default.gbtheme/images/generalbots-2018.ai.svg @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/default.gbai/default.gbtheme/images/logo-Pragmatismo.png b/templates/default.gbai/default.gbtheme/images/logo-Pragmatismo.png deleted file mode 100644 index 27c055cf7..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/logo-Pragmatismo.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/logo.jpg b/templates/default.gbai/default.gbtheme/images/logo.jpg deleted file mode 100644 index 80af54553..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/logo.jpg and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/logo.png b/templates/default.gbai/default.gbtheme/images/logo.png deleted file mode 100644 index 8677bb92e..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/logo.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/pragmatismo-logo.png b/templates/default.gbai/default.gbtheme/images/pragmatismo-logo.png deleted file mode 100644 index af20dea88..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/pragmatismo-logo.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/pragmatismo-powered-by.png b/templates/default.gbai/default.gbtheme/images/pragmatismo-powered-by.png deleted file mode 100644 index ed6242f4d..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/pragmatismo-powered-by.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/projector-background.jpg b/templates/default.gbai/default.gbtheme/images/projector-background.jpg deleted file mode 100644 index 8b70a5de0..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/projector-background.jpg and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/projetor_tela.png b/templates/default.gbai/default.gbtheme/images/projetor_tela.png deleted file mode 100644 index b984ff5a8..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/projetor_tela.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/screen.png b/templates/default.gbai/default.gbtheme/images/screen.png deleted file mode 100644 index 7ecac2d88..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/screen.png and /dev/null differ diff --git a/templates/default.gbai/default.gbtheme/images/tela-01.png b/templates/default.gbai/default.gbtheme/images/tela-01.png deleted file mode 100644 index 2b5965336..000000000 Binary files a/templates/default.gbai/default.gbtheme/images/tela-01.png and /dev/null differ