Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matthewdickinson
Copy link

Added basic support for the Google Hangouts Chat protocol.

@stojanovic
Copy link
Member

Thanks, this looks cool. I'll test it during the weekend and merge or comment.

P.S. Sorry for the late reply.

@stojanovic
Copy link
Member

@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?

Copy link
Member

@stojanovic stojanovic left a 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')) {
Copy link
Member

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;
Copy link
Member

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'};
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants