Skip to content

Conversation

@pierre-lehnen-rc
Copy link
Contributor

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

@pierre-lehnen-rc pierre-lehnen-rc added this to the 3.14.0 milestone Apr 23, 2021

const items = ldapUserGroups.filter((field) => field && field.ou).map((field) => (typeof field.ou === 'string' ? field.ou.split(',') : field.ou));
const groups = [];
for (const item of items) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this for is doing exactly what the reduce below is doing right? just flattening an array.. maybe you could use reduce in both places?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, just realized you used in other places too.. maybe could be even better creating a reducer to use on all those places =)

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 the Node version we use supports the [].flat function 👀 isn't it?

Copy link
Member

@sampaiodiego sampaiodiego Apr 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wut?! I didn't know that 🤔 [].flat is better indeed.. thx @KevLehman 🤗

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[].flat is like the flattenDeep method of lodash, It's pretty useful 🎉

@sampaiodiego sampaiodiego merged commit fefb3e0 into develop Apr 27, 2021
@sampaiodiego sampaiodiego deleted the regression.team-sync-not-accepting-multiple-teams branch April 27, 2021 16:51
@sampaiodiego sampaiodiego mentioned this pull request Apr 28, 2021
vanhoang1107 pushed a commit to vanhoang1107/Rocket.Chat that referenced this pull request May 13, 2021
* rocketchat/master: (273 commits)
  Bump version to 3.14.0
  Bump version to 3.14.0-rc.4
  bump fuselage (RocketChat#21841)
  [FIX] Duplicated header on admin's user contextualbar (RocketChat#21810)
  Bump version to 3.14.0-rc.3
  Bump Apps-Engine version (RocketChat#21840)
  [FIX][Enterprise] Omnichannel simultaneous chat limit is not properly checking the limit by department (RocketChat#21839)
  Fix node_modules cache path again
  Regression: Reactivate direct conversations only if all involved users are active (RocketChat#21714)
  Bump version to 3.14.0-rc.2
  [FIX] Omnichannel Activity Monitor closing chats returned to the queue (RocketChat#21782)
  Fix node_modules cache path
  Regression: Problem with Importer's logs (RocketChat#21812)
  Chore: Add tests for teams.update REST endpoint (RocketChat#21653)
  QoL improvements to add channel to team flow (RocketChat#21778)
  Chore: Cache EE node_modules on CI (RocketChat#21831)
  Regression: team sync not accepting multiple teams (RocketChat#21768)
  regression: Italic being parsed with surrounding non-whitespace text (RocketChat#21815)
  Regression: Unread Threads Header and List (RocketChat#21816)
  Fix attachment previews. (RocketChat#21746)
  ...
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.

4 participants