Added support for Google Hangouts Chat#125
Added support for Google Hangouts Chat#125matthewdickinson wants to merge 1 commit intoclaudiajs:masterfrom
Conversation
|
Thanks, this looks cool. I'll test it during the weekend and merge or comment. P.S. Sorry for the late reply. |
|
@matthewdickinson I need some help with setting up a chatbot. Can you write a short instructions how to do that? I created a bot as described here, but I can't activate the bot. Also, I got credentials for the chatbot, do I need to use them somehow? |
stojanovic
left a comment
There was a problem hiding this comment.
I added a few minor comments on the code, but none of them is important for merging.
| if (isEnabled('alexa')) { | ||
| alexaSetup(api, messageHandlerPromise, logError); | ||
| } | ||
| if (isEnabled('google-hangouts-chat')) { |
There was a problem hiding this comment.
I think we should use just hangouts because it's shorter but still describes the platform uniquely.
|
|
||
| module.exports = function googleHangoutsSetup(api, bot, logError, optionalParser, optionalResponder) { | ||
| let parser = optionalParser || googleHangoutsParse; | ||
| let responder = optionalResponder || googleHangoutsReply; |
There was a problem hiding this comment.
We can use const instead of let for both parser and responder, as they are not re-assigned. I guess should update that for other bots too.
| expect(parse({message: {}})).toBeUndefined(); | ||
| }); | ||
| it('should return original request with an empty text if the intent is missing', () => { | ||
| let msg = {message: {foo: 'bar'}, type: 'ADDED_TO_SPACE'}; |
There was a problem hiding this comment.
msg is never re-assigned, use const
Added basic support for the Google Hangouts Chat protocol.