-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Twilio-WhatsApp adapter #63
Add Twilio-WhatsApp adapter #63
Conversation
@szul please do not merge yet. I accidentally changed it to 'Ready for Review'. I just updated my example and the library to the latest version of
|
…ster Merge back (CODEOWNERS)
commit 5f6bc7c Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Aug 1 00:04:11 2019 +0200 add eslint disable commit dc9cb5c Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Aug 1 00:02:25 2019 +0200 Don’t escape unnecessary characters commit 1802dfc Merge: e055935 ac17d86 Author: Mick Vleeshouwer <mick@imick.nl> Date: Wed Jul 31 22:04:37 2019 +0200 Merge branch 'master' into adapter/twilio-whatsapp commit e055935 Merge: 694bba6 571cca7 Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 01:54:06 2019 +0200 Merge branch 'master' of github.com:BotBuilderCommunity/botbuilder-community-js into adapter/twilio-whatsapp commit 694bba6 Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:52:06 2019 +0200 Revert "Change to const instead of let" This reverts commit ca9d8fb. commit ca9d8fb Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:51:34 2019 +0200 Change to const instead of let commit 597624d Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:46:23 2019 +0200 ESLint fixes commit 0bfe9d9 Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:38:03 2019 +0200 ESLint fixes commit 088acfa Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:12:47 2019 +0200 Add changelog and info to root readme commit 9443e63 Merge: 62f8bfc 1a5f093 Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:03:50 2019 +0200 Merge branch 'master' of github.com:BotBuilderCommunity/botbuilder-community-js into adapter/twilio-whatsapp commit 62f8bfc Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 23:50:15 2019 +0200 Add example commit 0bdbead Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 23:25:17 2019 +0200 Code cleanup for review commit ae36618 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 23:17:59 2019 +0200 Refactor event handling (2) commit 99ef3d4 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 23:03:12 2019 +0200 Refactor event handling commit bc128b8 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 22:45:47 2019 +0200 Remove need for bodyParser() commit 7013575 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 22:44:44 2019 +0200 Implement bodyParser for www-form-urlencoded commit a6fb046 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 22:24:52 2019 +0200 Add support for Express + Restify without bodyParser() commit 28b85f4 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 22:03:18 2019 +0200 Add adapter with filename using camelCasing commit 6f36f80 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 22:02:40 2019 +0200 Remove adapter commit e012e26 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 20:03:41 2019 +0200 Update Readme commit c59c824 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 15:24:56 2019 +0200 Add formatting changes and clean up current code commit 31eaa3c Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 14:41:25 2019 +0200 Fixes commit 2310822 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 13:26:06 2019 +0200 Add beta status commit a001e28 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 13:19:20 2019 +0200 Improve documentation commit f86470f Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 12:46:47 2019 +0200 Better error handling commit 5a149d5 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 12:25:56 2019 +0200 Update documentation and add constant for channelId commit 198628b Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 12:07:20 2019 +0200 Improve documentation commit f7ed61e Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 11:55:40 2019 +0200 Add codeowners reference commit c708ec9 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 11:53:15 2019 +0200 Update package-lock commit 3eb2bc3 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 11:50:07 2019 +0200 Initial commit
5f6bc7c
to
9a97285
Compare
@szul It is ready for review. Could you have a look? I just need to write some unit tests before merge. The issue of my previous post is resolved, thanks to @stevengum. Apparently my test project had different versions of botbuilder dependencies. |
@iMicknl That happened to me before: |
…-whatsapp Adapter/twilio whatsapp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When initially running the tests for this, I received the following error:
C:\Users\micha\x\botbuilder-community-js\libraries\botbuilder-adapter-twilio-whatsapp\lib\twilioWhatsAppAdapter.js:258
activity.text = activity.text.replace(/<b>(.*?)<\/b>/gis, '*$1*');
^
SyntaxError: Invalid regular expression flags
The syntax looked correct to me, and the flags were valid with the latest online documentation, so I checked my Node.JS version, which was in 8.x.x range. I upgraded to the latest Node.JS, and the tests then started running. Not sure if we need to make a note about Node.JS version support.
This is good to go. I left some minor version and language comments I think we should debate/change before merging.
Minor tweaks
…er-community-js into adapter/twilio-whatsapp
@szul good catch! I didn't know the |
commit eb9055b Merge: 39fcc06 90f933d Author: Michael Szul <michael@szul.us> Date: Sun Aug 4 09:46:51 2019 -0400 Merge pull request BotBuilderCommunity#81 from iMicknl/adapter/twilio-whatsapp Fix README commit 90f933d Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Aug 4 15:44:53 2019 +0200 Add botbuilder prefix commit 39fcc06 Merge: 431585e d29449b Author: Michael Szul <michael@szul.us> Date: Sun Aug 4 09:44:36 2019 -0400 Merge pull request BotBuilderCommunity#80 from iMicknl/adapter/twilio-whatsapp Fix link in README commit d29449b Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Aug 4 15:41:39 2019 +0200 Readme fix commit 431585e Merge: ac17d86 f68bc16 Author: Michael Szul <michael@szul.us> Date: Sun Aug 4 09:37:31 2019 -0400 Merge pull request BotBuilderCommunity#63 from iMicknl/adapter/twilio-whatsapp Add Twilio-WhatsApp adapter commit f68bc16 Merge: 26607d7 c26f07e Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Aug 4 15:12:23 2019 +0200 Merge branch 'adapter/twilio-whatsapp' of github.com:iMicknl/botbuilder-community-js into adapter/twilio-whatsapp commit 26607d7 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Aug 4 15:11:14 2019 +0200 Improve documentation commit c26f07e Merge: ebe5581 9bc47a4 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Aug 4 15:05:26 2019 +0200 Merge pull request #1 from szul/twilio Minor tweaks commit 9bc47a4 Author: Michael Szul <michael@szul.us> Date: Sun Aug 4 08:38:22 2019 -0400 Updated version to basic 0.1.0 release and alphabetized codeowners commit 280741e Merge: b2296fd ebe5581 Author: Michael Szul <michael@szul.us> Date: Thu Aug 1 10:42:36 2019 -0400 Merge pull request BotBuilderCommunity#17 from iMicknl/adapter/twilio-whatsapp Adapter/twilio whatsapp commit ebe5581 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Aug 1 09:58:39 2019 +0200 Abstract creation of Twilio client commit 8ed5356 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Aug 1 00:43:52 2019 +0200 Add first unit tests commit c0aa8f2 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Aug 1 00:43:45 2019 +0200 Add missing SmsStatus commit 9a97285 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Aug 1 00:06:40 2019 +0200 First version of TwilioWhatsAppAdapter commit 5f6bc7c Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Aug 1 00:04:11 2019 +0200 add eslint disable commit dc9cb5c Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Aug 1 00:02:25 2019 +0200 Don’t escape unnecessary characters commit 1802dfc Merge: e055935 ac17d86 Author: Mick Vleeshouwer <mick@imick.nl> Date: Wed Jul 31 22:04:37 2019 +0200 Merge branch 'master' into adapter/twilio-whatsapp commit e055935 Merge: 694bba6 571cca7 Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 01:54:06 2019 +0200 Merge branch 'master' of github.com:BotBuilderCommunity/botbuilder-community-js into adapter/twilio-whatsapp commit 694bba6 Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:52:06 2019 +0200 Revert "Change to const instead of let" This reverts commit ca9d8fb. commit ca9d8fb Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:51:34 2019 +0200 Change to const instead of let commit 597624d Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:46:23 2019 +0200 ESLint fixes commit 0bfe9d9 Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:38:03 2019 +0200 ESLint fixes commit 088acfa Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:12:47 2019 +0200 Add changelog and info to root readme commit 9443e63 Merge: 62f8bfc 1a5f093 Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:03:50 2019 +0200 Merge branch 'master' of github.com:BotBuilderCommunity/botbuilder-community-js into adapter/twilio-whatsapp commit 62f8bfc Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 23:50:15 2019 +0200 Add example commit 0bdbead Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 23:25:17 2019 +0200 Code cleanup for review commit ae36618 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 23:17:59 2019 +0200 Refactor event handling (2) commit 99ef3d4 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 23:03:12 2019 +0200 Refactor event handling commit bc128b8 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 22:45:47 2019 +0200 Remove need for bodyParser() commit 7013575 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 22:44:44 2019 +0200 Implement bodyParser for www-form-urlencoded commit a6fb046 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 22:24:52 2019 +0200 Add support for Express + Restify without bodyParser() commit 28b85f4 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 22:03:18 2019 +0200 Add adapter with filename using camelCasing commit 6f36f80 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 22:02:40 2019 +0200 Remove adapter commit e012e26 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 20:03:41 2019 +0200 Update Readme commit c59c824 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 15:24:56 2019 +0200 Add formatting changes and clean up current code commit 31eaa3c Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 14:41:25 2019 +0200 Fixes commit 2310822 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 13:26:06 2019 +0200 Add beta status commit a001e28 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 13:19:20 2019 +0200 Improve documentation commit f86470f Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 12:46:47 2019 +0200 Better error handling commit 5a149d5 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 12:25:56 2019 +0200 Update documentation and add constant for channelId commit 198628b Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 12:07:20 2019 +0200 Improve documentation commit f7ed61e Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 11:55:40 2019 +0200 Add codeowners reference commit c708ec9 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 11:53:15 2019 +0200 Update package-lock commit 3eb2bc3 Author: Mick Vleeshouwer <mick@imick.nl> Date: Thu Jul 25 11:50:07 2019 +0200 Initial commit commit b2296fd Merge: 5859b9f ac17d86 Author: Michael Szul <michael@szul.us> Date: Tue Jul 30 07:44:59 2019 -0400 Merge pull request BotBuilderCommunity#16 from BotBuilderCommunity/master Merge back (CODEOWNERS) commit ac17d86 Merge: 571cca7 e951b6d Author: Michael Szul <michael@szul.us> Date: Tue Jul 30 07:44:14 2019 -0400 Merge pull request BotBuilderCommunity#72 from szul/codeowners Update CODEOWNERS to correct errors commit e951b6d Author: Michael Szul <michael@szul.us> Date: Tue Jul 30 07:42:42 2019 -0400 Update CODEOWNERS to correct errors commit 5859b9f Merge: c3fcb10 571cca7 Author: Michael Szul <michael@szul.us> Date: Mon Jul 29 15:19:58 2019 -0400 Merge pull request BotBuilderCommunity#15 from BotBuilderCommunity/master Merge back commit 571cca7 Merge: 1a5f093 27263ec Author: Michael Szul <michael@szul.us> Date: Sun Jul 28 19:24:05 2019 -0400 Merge pull request BotBuilderCommunity#69 from iMicknl/eslint Add ESLint to root commit 27263ec Merge: 25bd549 1a5f093 Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 01:06:48 2019 +0200 Merge branch 'master' of github.com:BotBuilderCommunity/botbuilder-community-js into eslint # Conflicts: # package-lock.json commit 25bd549 Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 01:05:40 2019 +0200 Fix `botbuilder-text-recognizer-middleware` commit 3380fec Author: Mick Vleeshouwer <mick@imick.nl> Date: Mon Jul 29 00:59:30 2019 +0200 Add basic ESLint setup commit 1a5f093 Merge: d7c484e b0ffc18 Author: Michael Szul <michael@szul.us> Date: Sun Jul 28 17:14:43 2019 -0400 Merge pull request BotBuilderCommunity#67 from iMicknl/readme_updates Updates to root README.md commit b0ffc18 Merge: b5caf27 d7c484e Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 20:52:27 2019 +0200 Merge branch 'master' of github.com:BotBuilderCommunity/botbuilder-community-js into readme_updates # Conflicts: # README.md commit b5caf27 Author: Mick Vleeshouwer <mick@imick.nl> Date: Sun Jul 28 20:51:15 2019 +0200 Update readme commit d7c484e Merge: a580708 c3fcb10 Author: Michael Szul <michael@szul.us> Date: Fri Jul 26 12:47:20 2019 -0400 Merge pull request BotBuilderCommunity#66 from szul/master Update to SDK 4.5.3 commit c3fcb10 Author: Michael Szul <michael@szul.us> Date: Fri Jul 26 12:46:04 2019 -0400 Update to SDK 4.5.3
Adapter is working fine with Twilio Sandbox.
Notes for reviewer:
<b>text</b>
tot*text*
for example. Or should this transformation be done in the bot code / middleware. Currently those default HTML to supported markdown transformations are built in.TODO