-
Notifications
You must be signed in to change notification settings - Fork 4
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/Remove Participant #1
base: master
Are you sure you want to change the base?
Conversation
|
||
if (!users.length) { | ||
if (users.length !== 1) { |
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.
Not sure why you changed this. Can you explain?
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.
The function searchUsers already checks for
if (!users.length)
and
if (users.length > 1)
so after the function is called, we just have to check if the function returned 1 result.
@@ -61,13 +539,14 @@ app.intent('send.message', async (conv, {target, message}) => { | |||
|
|||
if (!users.length && !convs.length) { | |||
conv.ask(`I cannot find any user or conversation called ${target}. What's the name?`); | |||
conv.contexts.set('sendmessage_getconv', 5); |
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.
What this a bug in the existing code? If so what was the bug?
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.
Yes. After a user and conversation could not be found, the Google Assistant would immediately go to the default fallback intent rather than the collect.target followup intent.
circuitClient.js
Outdated
|
||
// Properties | ||
Object.defineProperty(this, 'user', { | ||
get: _ => { return this.client.loggedOnUser; } | ||
get: _ => { |
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.
Hmm, maybe I should ask Roger but couldn't we just do get: _ => this.client.loggedOnUser
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.
This shouldn't have been modified on my end. I reverted the change; you can still ask Roger about it though.
Allows a user to add or remove anyone from a conversation.