-
Notifications
You must be signed in to change notification settings - Fork 256
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
Added support for Google Hangouts Chat #125
base: master
Are you sure you want to change the base?
Added support for Google Hangouts Chat #125
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? |
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.
I added a few minor comments on the code, but none of them is important for merging.
@@ -68,6 +69,9 @@ module.exports = function botBuilder(messageHandler, options, optionalLogError) | |||
if (isEnabled('alexa')) { | |||
alexaSetup(api, messageHandlerPromise, logError); | |||
} | |||
if (isEnabled('google-hangouts-chat')) { |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msg
is never re-assigned, use const
Added basic support for the Google Hangouts Chat protocol.