Conversation
| rooms: true, | ||
| users: true | ||
| }) | ||
| ); |
There was a problem hiding this comment.
@RocketChat/core For some reason, this method ALWAYS returns rooms empty. I tried debugging it already and it's entering the part of the code that queries per rooms, so I don't know what's going on. Here's the call example I'm using:
curl -X GET -H "X-Auth-Token: 6eWs4ECxUITYYoZ_bAYK5OE2srkxAepQqQA1cGGv3jK" -H "X-User-Id: hvzu8z6mHFigiXy6Y" http://localhost:3000/api/v1/spotlight?query=tAnd I do have a room with the name of general and testing-public-channel. The users I'm trying also have all the permissions required to search by rooms: view-outside-room and view-c-room. Does someone have any idea what's going on?
There was a problem hiding this comment.
The query must be a valid json object.
There was a problem hiding this comment.
@graywolf336 What do you mean? It works for users... do you have an example of how it should be?
There was a problem hiding this comment.
Never mind, I thought you was doing something else. Ignore my comment.
There was a problem hiding this comment.
@rafaelks If you call it via DDP it returns data for rooms?
There was a problem hiding this comment.
Exactly as you wrote for the server side call, but from you browser (logged in)
Meteor.call('spotlight', 't', null, {
rooms: true,
users: true
})
There was a problem hiding this comment.
Per our chat, the API is correct & it's not returning the objects because user already joined the rooms.
MarcosSpessatto
left a comment
There was a problem hiding this comment.
Great Work @rafaelks !
|
|
||
| let result; | ||
| Meteor.runAsUser(this.userId, () => | ||
| result = Meteor.call('spotlight', query, null, { |
There was a problem hiding this comment.
@MarcosSpessatto change to use result from Meteor.runAsUser return
small fix
|
Is this PR missing something @rodrigok @MarcosSpessatto? |
looks like feedback was addressed
@RocketChat/core
Closes #9508
Progress