-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Regression: fix directory
endpoint not listing teams
#26310
Conversation
fa7bd90
to
ac72201
Compare
directory
endpoint not listing teams
}); | ||
const getChannelsCountForTeam = mem( | ||
(teamId) => { | ||
return Rooms.findByTeamId(teamId, { projection: { _id: 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.
as far as i understand this returns a cursor, cursors are VERY FAST, they only generates a object structure, no cache needed
const teams = []; | ||
|
||
for await (const room of rooms) { | ||
const roomsCount = await getChannelsCountForTeam(room.teamId).count(); |
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 count generates a call to the db, it could be cached
that endpoint is missing a test to validate the return of teams.. can either of you @carlosrodrigues94 or @matheusbsilva137 add a test to it pls? |
* 'develop' of github.com:RocketChat/Rocket.Chat: (294 commits) Chore: Convert UserCardWithData to ts (#26192) Chore: cleanup startup of test and put wizard in setup function (#26306) Chore: Convert AccountPreferencesPage to ts (#26096) [FIX] Missing bio field UI validation (#26345) Chore: Remove square prop from IconButton (#26343) Chore: Rewrite VerticalBarOldActions to TS (#26277) Chore: Replace direct multiple icon (#26342) Chore: Upgrade ESLint (#26132) Chore: convert autotranslate to ts (#25953) Chore: Change some places still using fields to projection (#26308) Bump version to 5.1.0-develop Bump version to 5.0.0 Bump version to 5.0.0-rc.12 Regression: Livechat not rendering UiKit messages with action buttons (#26327) Chore: bump fuselage packages (#26325) Chore: Update useSidebarPalette selectors (#26322) Regression: Fix get myself user data (#26328) Bump version to 5.0.0-rc.11 Bump version to 4.8.2 Regression: fix `directory` endpoint not listing teams (#26310) ...
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments