-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[FIX] REST spotlight API wasn't allowing searches with # and @ #10410
Conversation
…to search users and channels with # and @
@@ -98,4 +98,34 @@ describe('miscellaneous', function() { | |||
}); | |||
}); | |||
|
|||
describe('[/spotlight]', () => { |
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.
Can we add a test that ensures the #channel
works as expected? Also, actually ensure the result contains member and room objects instead of the below length that checks for 0
?
I know this was just moved to the correct test file, but since we are adding a new feature to the endpoint I think it would be great to test it.
const { query } = this.queryParams; | ||
|
||
const result = Meteor.runAsUser(this.userId, () => | ||
Meteor.call('spotlight', query, null, { |
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.
Just a small change, but the { rooms: true, users: true }
isn't required since that's the default... so it could just be Meteor.call('spotlight, query)
🤔
…g unused parameter
Fix REST spotlight to allow searches with # and @.
Closes #8205.