From faccecf76e158039978f0ab99f154dec8435eb79 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Fri, 2 Sep 2022 13:40:28 +0000 Subject: [PATCH 1/4] chore(release): 2.0.174 [skip ci] ## [2.0.174](https://github.com/GeneralBots/BotServer/compare/2.0.173...2.0.174) (2022-09-02) ### Bug Fixes * **whatsapp.gblib:** .gbapp message subprocessing. ([c14a766](https://github.com/GeneralBots/BotServer/commit/c14a766047ec1cad9e52104a52a10afb93b8fd71)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c062452..439f925b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2.0.174](https://github.com/GeneralBots/BotServer/compare/2.0.173...2.0.174) (2022-09-02) + + +### Bug Fixes + +* **whatsapp.gblib:** .gbapp message subprocessing. ([c14a766](https://github.com/GeneralBots/BotServer/commit/c14a766047ec1cad9e52104a52a10afb93b8fd71)) + ## [2.0.173](https://github.com/GeneralBots/BotServer/compare/2.0.172...2.0.173) (2022-09-01) diff --git a/package.json b/package.json index f6d75219..bca8c570 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "botserver", - "version": "2.0.173", + "version": "2.0.174", "description": "General Bot Community Edition open-core server.", "main": "./boot.js", "bugs": "https://github.com/pragmatismo-io/BotServer/issues", From 5261691ba94708a9d75d9155898a13cf55137733 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Sun, 4 Sep 2022 18:50:36 -0300 Subject: [PATCH 2/4] fix(whatsapp.gblib): SEND FILE and WPP providers. --- package-lock.json | 52 +++---- packages/core.gbapp/services/GBMinService.ts | 20 ++- .../services/WhatsappDirectLine.ts | 140 ++++++++++-------- src/app.ts | 3 +- 4 files changed, 116 insertions(+), 99 deletions(-) diff --git a/package-lock.json b/package-lock.json index 38ecec1d..94ce2ac0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "botserver", - "version": "2.0.167", + "version": "2.0.168", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -5070,7 +5070,7 @@ "any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" }, "any-shell-escape": { "version": "0.1.1", @@ -5699,12 +5699,12 @@ "process-nextick-args": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha512-yN0WQmuCX63LP/TMvAg31nvT6m4vDqJEiiv2CAZqWOGNWutc9DfDk1NPYYmKUFmaVM2UwDowH4u5AHWYP/jxKw==" + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "readable-stream": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha512-TXcFfb63BQe1+ySzsHZI/5v1aJPCShfqvWJ64ayNImXMsN1Cd0YGk/wm8KB7/OeessgPc9QvS9Zou8QTkFzsLw==", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -5717,22 +5717,22 @@ "sax": { "version": "0.5.8", "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", - "integrity": "sha512-c0YL9VcSfcdH3F1Qij9qpYJFpKFKMXNOkLWFssBL3RuF7ZS8oZhllR2rWlCRjDTJsfq3R6wbSsaRU6o0rkEdNw==" + "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=" }, "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "underscore": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha512-5WsVTFcH1ut/kkhAaHf4PVgI8c7++GiVcpCGxPouI6ZVjsqPnSDf8h/8HtVqc0t4fzRXwnMK70EcZeAs3PIddg==" + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" }, "xml2js": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.2.8.tgz", - "integrity": "sha512-ZHZBIAO55GHCn2jBYByVPHvHS+o3j8/a/qmpEe6kxO3cTnTCWC3Htq9RYJ5G4XMwMMClD2QkXA9SNdPadLyn3Q==", + "integrity": "sha1-m4FpCTFjH/CdGVdUn69U9PmAs8I=", "requires": { "sax": "0.5.x" } @@ -5740,7 +5740,7 @@ "xmlbuilder": { "version": "9.0.7", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha512-7YXTQc3P2l9+0rjaUbLwMKRhtmwg1M1eDf6nag7urC7pIPYLD9W/jmzQ4ptRSUbodw5S0jfoGTflLemQibSpeQ==" + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" } } }, @@ -6245,7 +6245,7 @@ "binary-search-bounds": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/binary-search-bounds/-/binary-search-bounds-2.0.3.tgz", - "integrity": "sha512-GMGnMG7owGQwTBNWdOnWvU6KC2k/lULWdbdXq95kxJHdTzeDa9x8QNwMXCv/7pfPGx9Zdi1nmCDZ0j+Tmk+vRg==" + "integrity": "sha1-X/hhbW3SylOIvIWy1iZuK52lAtw=" }, "bl": { "version": "4.1.0", @@ -6388,7 +6388,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "tough-cookie": { "version": "2.5.0", @@ -7425,7 +7425,7 @@ "browserify-mime": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/browserify-mime/-/browserify-mime-1.2.9.tgz", - "integrity": "sha512-uz+ItyJXBLb6wgon1ELEiVowJBEsy03PUWGRQU7cxxx9S+DW2hujPp+DaMYEOClRPzsn7NB99NtJ6pGnt8y+CQ==" + "integrity": "sha1-rrGvKN5sDXpqLOQK22j/GEIq8x8=" }, "browserslist": { "version": "4.19.1", @@ -8331,7 +8331,7 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" } } }, @@ -10745,7 +10745,7 @@ "semaphore": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.0.5.tgz", - "integrity": "sha512-15WnK4TxpOk33fL0UoDnJ5myIWwJiodIZHtPRBoSxcaADt1Tm7kxEERd8n0vsw6OWsXwCCeROjSKU9MqfHaS1A==" + "integrity": "sha1-tJJXbmavGT25XWXiXsU/Xxl5jWA=" }, "tunnel": { "version": "0.0.5", @@ -10755,7 +10755,7 @@ "underscore": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha512-5WsVTFcH1ut/kkhAaHf4PVgI8c7++GiVcpCGxPouI6ZVjsqPnSDf8h/8HtVqc0t4fzRXwnMK70EcZeAs3PIddg==" + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" } } }, @@ -11641,7 +11641,7 @@ "event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "requires": { "d": "1", "es5-ext": "~0.10.14" @@ -13860,7 +13860,7 @@ "inflection": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz", - "integrity": "sha512-lRy4DxuIFWXlJU7ed8UiTJOSTqStqYdEb4CEbtXfNbkdj3nH1L+reUWiE10VWcJS2yR7tge8Z74pJjtBjNwj0w==" + "integrity": "sha1-ogCTVlbW9fa8TcdQLhrstwMihBY=" }, "inflight": { "version": "1.0.6", @@ -14082,7 +14082,7 @@ "int64-buffer": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/int64-buffer/-/int64-buffer-0.1.10.tgz", - "integrity": "sha512-v7cSY1J8ydZ0GyjUHqF+1bshJ6cnEVLo9EnjB8p+4HDRPZc9N5jjmvUV7NvEsqQOKyH0pmIBFWXVQbiS0+OBbA==" + "integrity": "sha1-J3siiofZWtd30HwTgyAiQGpHNCM=" }, "internal-slot": { "version": "1.0.3", @@ -14930,7 +14930,7 @@ "json-edm-parser": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/json-edm-parser/-/json-edm-parser-0.1.2.tgz", - "integrity": "sha512-J1U9mk6lf8dPULcaMwALXB6yel3cJyyhk9Z8FQ4sMwiazNwjaUhegIcpZyZFNMvLRtnXwh+TkCjX9uYUObBBYA==", + "integrity": "sha1-HmCw/vG8CvZ7wNFG393lSGzWFbQ=", "requires": { "jsonparse": "~1.2.0" } @@ -16214,7 +16214,7 @@ "lru-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", "requires": { "es5-ext": "~0.10.2" } @@ -16328,7 +16328,7 @@ "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha512-cBB1zpoIg3GaI1IJyoc715xmWofOcXbMhVHAR/TLYk+RO+Y6xQfAp+UshPZTojAcju91Jyk5fw4CiLBuBVaQjw==", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -20986,7 +20986,7 @@ "priorityqueuejs": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/priorityqueuejs/-/priorityqueuejs-1.0.0.tgz", - "integrity": "sha512-lg++21mreCEOuGWTbO5DnJKAdxfjrdN0S9ysoW9SzdSJvbkWpkaDdpG/cdsPCsEnoLUwmd9m3WcZhngW7yKA2g==" + "integrity": "sha1-LuTyPCVgkT4IwHzlzN1t498sWvg=" }, "prism-media": { "version": "1.3.1", @@ -22897,7 +22897,7 @@ "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==" + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "locate-path": { "version": "3.0.0", @@ -22932,7 +22932,7 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==" + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "require-main-filename": { "version": "2.0.0", @@ -23414,7 +23414,7 @@ "simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", "requires": { "is-arrayish": "^0.3.1" } @@ -26654,7 +26654,7 @@ "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha512-Vd1yWKYGMtzFB6bAuTI7/POwJnwQStQXOe1PW1GmjUZgkaKYGc6/Pl3IDGFgplEklF65niuwBHeS5yve4+U01Q==" + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" }, "yaeti": { "version": "0.0.6", diff --git a/packages/core.gbapp/services/GBMinService.ts b/packages/core.gbapp/services/GBMinService.ts index 23853620..798f741d 100644 --- a/packages/core.gbapp/services/GBMinService.ts +++ b/packages/core.gbapp/services/GBMinService.ts @@ -637,17 +637,15 @@ export class GBMinService { await min.whatsAppDirectLine.setup(true); } else { const minBoot = GBServer.globals.minBoot as any; - if (minBoot.instance.whatsappServiceUrl) { - min.whatsAppDirectLine = new WhatsappDirectLine( - min, - min.botId, - min.instance.whatsappBotKey, - minBoot.instance.whatsappServiceKey, - minBoot.instance.whatsappServiceNumber, - minBoot.instance.whatsappServiceUrl - ); - await min.whatsAppDirectLine.setup(false); - } + min.whatsAppDirectLine = new WhatsappDirectLine( + min, + min.botId, + min.instance.whatsappBotKey, + minBoot.instance.whatsappServiceKey, + minBoot.instance.whatsappServiceNumber, + minBoot.instance.whatsappServiceUrl + ); + await min.whatsAppDirectLine.setup(false); } // Setups default BOT Framework dialogs. diff --git a/packages/whatsapp.gblib/services/WhatsappDirectLine.ts b/packages/whatsapp.gblib/services/WhatsappDirectLine.ts index 2023621e..69b2764b 100644 --- a/packages/whatsapp.gblib/services/WhatsappDirectLine.ts +++ b/packages/whatsapp.gblib/services/WhatsappDirectLine.ts @@ -121,66 +121,76 @@ export class WhatsappDirectLine extends GBService { switch (this.provider) { case 'GeneralBots': - // Initialize the browser using a local profile for each bot. + const minBoot = GBServer.globals.minBoot as any; + if (minBoot.botId !== this.botId) { - const gbaiName = `${this.min.botId}.gbai`; - let localName = Path.join('work', gbaiName, 'profile'); - let client = this.customClient = new Client({ - authStrategy: new LocalAuth({ - clientId: this.min.botId, - dataPath: localName - }), - puppeteer: { - headless: false, args: ['--disable-features=site-per-process', - `--user-data-dir=${localName}`] - } - }); - client.initialize(); + this.customClient = minBoot.whatsAppDirectLine.customClient; - // Dispatches messages to the received method. + } + else { - client.on('message', (async message => { - await this.WhatsAppCallback(message, null); - }).bind(this)); + // Initialize the browser using a local profile for each bot. - client.on('qr', (async (qr) => { + const gbaiName = `${this.min.botId}.gbai`; + let localName = Path.join('work', gbaiName, 'profile'); + let client = this.customClient = new Client({ + authStrategy: new LocalAuth({ + clientId: this.min.botId, + dataPath: localName + }), + puppeteer: { + headless: false, args: ['--disable-features=site-per-process', + `--user-data-dir=${localName}`] + } + }); + client.initialize(); - const adminNumber = this.min.core.getParam(this.min.instance, 'Bot Admin Number', null); - const adminEmail = this.min.core.getParam(this.min.instance, 'Bot Admin E-mail', null); - - // Sends QR Code to boot bot admin. - - const msg = `Please, scan QR Code with for bot ${this.botId}.`; - GBLog.info(msg); - qrcode.generate(qr, { small: true, scale: 0.5 }); + // Dispatches messages to the received method. - // While handling other bots uses boot instance of this class to send QR Codes. + client.on('message', (async message => { + await this.WhatsAppCallback(message, null); + }).bind(this)); - if (this.botId !== GBServer.globals.minBoot.botId) { + client.on('qr', (async (qr) => { - const s = new DialogKeywords(null, null, null, null); - const qrBuf = await s.getQRCode(qr); - const gbaiName = `${this.min.botId}.gbai`; - const localName = Path.join('work', gbaiName, 'cache', `qr${GBAdminService.getRndReadableIdentifier()}.png`); - fs.writeFileSync(localName, qrBuf); - const url = urlJoin( - GBServer.globals.publicAddress, - this.min.botId, - 'cache', - Path.basename(localName) - ); - GBServer.globals.minBoot.whatsAppDirectLine.sendFileToDevice(adminNumber, url, Path.basename(localName), msg); - s.sendEmail(adminEmail, `Check your WhatsApp for bot ${this.botId}`, msg); - } + const adminNumber = this.min.core.getParam(this.min.instance, 'Bot Admin Number', null); + const adminEmail = this.min.core.getParam(this.min.instance, 'Bot Admin E-mail', null); - }).bind(this)); + // Sends QR Code to boot bot admin. - client.on('authenticated', () => { - GBLog.info(`WhatsApp QR Code authenticated for ${this.botId}.`); - }); + const msg = `Please, scan QR Code with for bot ${this.botId}.`; + GBLog.info(msg); + qrcode.generate(qr, { small: true, scale: 0.5 }); - setUrl = false; + + // While handling other bots uses boot instance of this class to send QR Codes. + + if (this.botId !== GBServer.globals.minBoot.botId) { + + const s = new DialogKeywords(null, null, null, null); + const qrBuf = await s.getQRCode(qr); + const gbaiName = `${this.min.botId}.gbai`; + const localName = Path.join('work', gbaiName, 'cache', `qr${GBAdminService.getRndReadableIdentifier()}.png`); + fs.writeFileSync(localName, qrBuf); + const url = urlJoin( + GBServer.globals.publicAddress, + this.min.botId, + 'cache', + Path.basename(localName) + ); + GBServer.globals.minBoot.whatsAppDirectLine.sendFileToDevice(adminNumber, url, Path.basename(localName), msg); + s.sendEmail(adminEmail, `Check your WhatsApp for bot ${this.botId}`, msg); + } + + }).bind(this)); + + client.on('authenticated', () => { + GBLog.info(`WhatsApp QR Code authenticated for ${this.botId}.`); + }); + + setUrl = false; + } break; case 'chatapi': @@ -223,11 +233,11 @@ export class WhatsappDirectLine extends GBService { break; } - if (setUrl) { + if (setUrl && options) { const express = require('express'); GBServer.globals.server.use(`/audios`, express.static('work')); - + try { const res = await request.post(options); } catch (error) { @@ -647,8 +657,8 @@ export class WhatsappDirectLine extends GBService { let options; switch (this.provider) { case 'GeneralBots': - const attachment = MessageMedia.fromUrl(url); - await this.customClient.sendMessage(to += '@c.us', attachment, { caption: caption }); + const attachment = await MessageMedia.fromUrl(url); + await this.customClient.sendMessage(to + '@c.us', attachment, { caption: caption }); break; case 'chatapi': @@ -698,12 +708,14 @@ export class WhatsappDirectLine extends GBService { break; } - try { - // tslint:disable-next-line: await-promise - const result = await request.post(options); - GBLog.info(`File ${url} sent to ${to}: ${result}`); - } catch (error) { - GBLog.error(`Error sending file to Whatsapp provider ${error.message}`); + if (options) { + try { + // tslint:disable-next-line: await-promise + const result = await request.post(options); + GBLog.info(`File ${url} sent to ${to}: ${result}`); + } catch (error) { + GBLog.error(`Error sending file to Whatsapp provider ${error.message}`); + } } } @@ -860,7 +872,7 @@ export class WhatsappDirectLine extends GBService { switch (provider) { case "GeneralBots": - id = req.author.split('@')[0]; + id = req.from.split('@')[0]; senderName = req._data.notifyName; text = req.body; @@ -997,8 +1009,11 @@ export class WhatsappDirectLine extends GBService { id, `Olá! Seja bem-vinda(o)!\nMe chamo ${activeMin.instance.title}. Como posso ajudar? Pode me falar que eu te ouço, me manda um aúdio.` , null); - res.end(); + if (res) { + res.end(); + } } + } else { // User wants to switch bots. @@ -1034,7 +1049,10 @@ export class WhatsappDirectLine extends GBService { null ); } - res.end(); + if (res) { + res.end(); + } + } else { activeMin = GBServer.globals.minInstances.filter(p => p.instance.instanceId === user.instanceId)[0]; if (activeMin === undefined) { diff --git a/src/app.ts b/src/app.ts index 90638a58..3c0e53e9 100644 --- a/src/app.ts +++ b/src/app.ts @@ -81,7 +81,7 @@ export class GBServer { */ public static run() { - + GBLog.info(`The Bot Server is in STARTING mode...`); GBServer.globals = new RootData(); @@ -112,6 +112,7 @@ export class GBServer { try { GBLog.info(`Now accepting connections on ${port}...`); + process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; // Reads basic configuration, initialize minimal services. From d27cc0cffc0f280cf3b9d55f05428150283c97a8 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Sun, 4 Sep 2022 22:00:19 +0000 Subject: [PATCH 3/4] chore(release): 2.0.175 [skip ci] ## [2.0.175](https://github.com/GeneralBots/BotServer/compare/2.0.174...2.0.175) (2022-09-04) ### Bug Fixes * **whatsapp.gblib:** SEND FILE and WPP providers. ([05260c0](https://github.com/GeneralBots/BotServer/commit/05260c0ee5cada86bae5dd30db48e8c65c3ed53e)) * **whatsapp.gblib:** SEND FILE and WPP providers. ([5261691](https://github.com/GeneralBots/BotServer/commit/5261691ba94708a9d75d9155898a13cf55137733)) --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 439f925b..c998faa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [2.0.175](https://github.com/GeneralBots/BotServer/compare/2.0.174...2.0.175) (2022-09-04) + + +### Bug Fixes + +* **whatsapp.gblib:** SEND FILE and WPP providers. ([05260c0](https://github.com/GeneralBots/BotServer/commit/05260c0ee5cada86bae5dd30db48e8c65c3ed53e)) +* **whatsapp.gblib:** SEND FILE and WPP providers. ([5261691](https://github.com/GeneralBots/BotServer/commit/5261691ba94708a9d75d9155898a13cf55137733)) + ## [2.0.174](https://github.com/GeneralBots/BotServer/compare/2.0.173...2.0.174) (2022-09-02) diff --git a/package.json b/package.json index bca8c570..46a3ab7e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "botserver", - "version": "2.0.174", + "version": "2.0.175", "description": "General Bot Community Edition open-core server.", "main": "./boot.js", "bugs": "https://github.com/pragmatismo-io/BotServer/issues", From cbfae96c9952ce527e2629011cb656dbd3b283a9 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Mon, 5 Sep 2022 11:36:29 -0300 Subject: [PATCH 4/4] Update and rename CODE_OF_CONDUCT.md to CODE_OF_CONDUCT-pt-br.md --- CODE_OF_CONDUCT-pt-br.md | 48 ++++++++++++++++++++++++++++++++++++++++ CODE_OF_CONDUCT.md | 48 ---------------------------------------- 2 files changed, 48 insertions(+), 48 deletions(-) create mode 100644 CODE_OF_CONDUCT-pt-br.md delete mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT-pt-br.md b/CODE_OF_CONDUCT-pt-br.md new file mode 100644 index 00000000..355bad54 --- /dev/null +++ b/CODE_OF_CONDUCT-pt-br.md @@ -0,0 +1,48 @@ +# Código de Conduta do Convênio do Contribuinte + +## Nosso Compromisso + +No interesse de promover um ambiente aberto e acolhedor, nós, como colaboradores e mantenedores, nos comprometemos a tornar a participação em nosso projeto e nossa comunidade uma experiência livre de assédio para todos, independentemente de idade, tamanho corporal, deficiência, etnia, identidade e expressão de gênero, nível de experiência, nacionalidade, aparência pessoal, raça, religião ou identidade e orientação sexual. + +##Nossos Padrões + +Exemplos de comportamento que contribuem para a criação de um ambiente positivo incluem: + +* Usando padrão (sem expressões idiomáticas), linguagem acolhedora e inclusiva +* Ser respeitoso com diferentes pontos de vista e experiências +* Aceitar graciosamente críticas construtivas +* Foco no que é melhor para a comunidade +* Mostrando empatia para com outros membros da comunidade +* Escrevendo pedaços gerais de código para que possa ser amplamente utilizado. + +Exemplos de comportamento inaceitável por parte dos participantes incluem: + +* O uso de linguagem ou imagens sexualizadas e atenção ou avanços sexuais indesejados +* Trolling, comentários insultuosos/depreciativos e ataques pessoais ou políticos +* Assédio público ou privado +* Publicar informações privadas de outras pessoas, como endereço físico ou eletrônico, sem permissão explícita +* Outras condutas que possam ser razoavelmente consideradas inadequadas em um ambiente profissional +* Chame uma pessoa com um nome diferente do declarado pela pessoa + +## Nossas responsabilidades + +Os mantenedores do projeto são responsáveis ​​por esclarecer os padrões de comportamento aceitável e espera-se que tomem ações corretivas apropriadas e justas em resposta a quaisquer instâncias de comportamento inaceitável. + +Os mantenedores do projeto têm o direito e a responsabilidade de remover, editar ou rejeitar comentários, commits, códigos, edições de wiki, problemas e outras contribuições que não estejam alinhadas a este Código de Conduta, ou banir temporária ou permanentemente qualquer colaborador por outros comportamentos que consideram inadequado, ameaçador, ofensivo ou prejudicial. + +## Alcance + +Este Código de Conduta se aplica tanto nos espaços do projeto quanto nos espaços públicos quando um indivíduo representa o projeto ou sua comunidade. Exemplos de representação de um projeto ou comunidade incluem o uso de um endereço de e-mail oficial do projeto, postagem por meio de uma conta oficial de mídia social ou atuação como representante designado em um evento online ou offline. A representação de um projeto pode ser melhor definida e esclarecida pelos mantenedores do projeto. + +## Aplicação + +Casos de comportamento abusivo, de assédio ou de outra forma inaceitável podem ser relatados entrando em contato com a equipe de segurança do Pragmatismo.io em security@pragmatismo.io. A equipe do projeto analisará e investigará todas as reclamações e responderá da maneira que julgar apropriada às circunstâncias. A equipe do projeto é obrigada a manter a confidencialidade em relação ao relator de um incidente. Mais detalhes de políticas de aplicação específicas podem ser postados separadamente. + +Os mantenedores do projeto que não seguem ou aplicam o Código de Conduta de boa fé podem enfrentar repercussões temporárias ou permanentes conforme determinado por outros membros da liderança do projeto. + +## Atribuição + +Este Código de Conduta é adaptado do [Contributor Covenant][homepage], versão 1.4, disponível em [http://contributor-covenant.org/version/1/4][version] + +[página inicial]: http://contributor-covenant.org +[versão]: http://contributor-covenant.org/version/1/4/ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index f31de826..00000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,48 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using standard(no idiomatic expressions), welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members -* Writing general pieces of code so it can be widely used. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting -* Call a person other name than that declared by the person - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Pragmatismo.io security team at security@pragmatismo.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/