Skip to content
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

Release 4.2.0 #23825

Merged
merged 85 commits into from Nov 30, 2021
Merged

Release 4.2.0 #23825

merged 85 commits into from Nov 30, 2021

Conversation

sampaiodiego
Copy link
Member

2021-11-30 · 9 🎉 · 7 🚀 · 26 🐛 · 27 🔍 · 24 👩‍💻👨‍💻

Engine versions

  • Node: 12.22.1
  • NPM: 6.14.1
  • MongoDB: 3.6, 4.0, 4.2, 4.4, 5.0
  • Apps-Engine: 1.28.1

🎉 New features

  • Allow Omnichannel statistics to be collected. (#23694)

    This PR adds the possibility for business stakeholders to see what is actually being used of the Omnichannel integrations.

  • Allow registering by REG_TOKEN environment variable (#23737)

    You can provide the REG_TOKEN environment variable containing a registration token and it will automatically register to your cloud account. This simplifies the registration flow

  • Audio and Video calling in Livechat (#23004 by @Deepak-learner & @dhruvjain99)

  • Enable LDAP manual sync to deployments without EE license (#23761)

    Open the Enterprise LDAP API that executes background sync to be used without any Enterprise License and enforce 2FA requirements.

  • Permission for download/uploading files on mobile (#23686)

  • Permissions for interacting with Omnichannel Contact Center (#23389)

    Adds a new permission, one that allows for control over user access to Omnichannel Contact Center,

  • Rate limiting for user registering (#23732)

  • REST endpoints to manage Omnichannel Business Units (#23750)

    Basic documentation about endpoints can be found at https://www.postman.com/kaleman960/workspace/rocketchat-public-api/request/3865466-71502450-8c8f-42b4-8954-1cd3d01fcb0c

  • Show on-hold metrics on analytics pages and current chats (#23498)

🚀 Improvements

  • Allow override of default department for SMS Livechat sessions (#23626 by @bhardwajaditya)

  • Engagement Dashboard (#23547)

    • Adds helpers onToggledFeature for server and client code to handle license activation/deactivation without server restart;

    • Replaces usage of useEndpointData with useQuery (from React Query);

    • Introduces view-engagement-dashboard permission.

  • Improve the add user drop down for add a user in create channel modal for UserAutoCompleteMultiple (#23766 by @Jeanstaquet)

    Seeing only the name of the person you are not adding is not practical in my opinion because two people can have the same name. Moreover, you can't see the username of the person you want to add in the dropdown. So I changed that and created another selection of users to show the username as well. I made this change so that it would appear in the key place for creating a room and adding a user.

    Before:

    2021-04-19.20-50-17.mp4

    After:

    2021-04-19.20-38-14.mp4
  • MKP12 - New UI - Merge Apps and Marketplace Tabs and Content (#23542)

    Merged the Marketplace and Apps page into a single page with a tabs component that changes between Markeplace and installed apps.
    page merging

  • Re-naming department query param for Twilio (#23725)

    Since the endpoint supports both, department ID and department Name, so we're renaming it to reflect the same. departmentName -> department

  • Reduce complexity in some functions (#23387)

    Overhauls all places where eslint's complexity rule is disabled.

  • Stricter API types (#23735)

    It:

    • Adds stricter types for API;

    • Enables types for urlParams;

    • Removes mandatory passage of undefined payload on client;

    • Corrects some regressions;

    • Reassures my belief in TypeScript supremacy.

🐛 Bug fixes

  • "to users" not working in export message (#23576)

  • ENTERPRISE: OAuth "Merge Roles" removes roles from users (#23588)

    • Fix OAuth "Merge Roles": the "Merge Roles" option now synchronize only the roles described in the "Roles to Sync" setting available in each Custom OAuth settings' group (instead of replacing users' roles by their OAuth roles);

    • Fix "Merge Roles" and "Channel Mapping" not being performed/updated on OAuth login.

  • ENTERPRISE: Private rooms and discussions can't be audited (#23673)

    • Add Private rooms (groups) and Discussions to the Message Auditing (Channels) autocomplete;

    • Update "Channels" tab name to "Rooms".

  • ENTERPRISE: Replace all occurrences of a placeholder on string instead of just first one (#23703)

  • Advanced LDAP Sync Features (#23608)

  • App update flow failing in HA setups (#23607)

    The flow for app updates is broken in specific scenarios with HA setups. Here we change the method calls in the Apps-Engine to avoid race conditions

  • Apps scheduler "losing" jobs after server restart (#23566)

    If a job is scheduled and the server restarted, said job won't be executed, giving the impression it's been lost.

    What happens is that the scheduler is only started when some app tries to schedule an app - if that happens, all jobs that are "late" will be executed; if that doesn't happen, no job will run.

    This PR starts the apps scheduler right after all apps have been loaded

  • Autofocus on search input in admin (#23738)

    Removed "generic" autofocus on sidenav template.

  • Await promise to handle error when attempting to transfer a room (#23739)

  • broken avatar preview when changing avatar (#23659 by @Aman-Maheshwari)

  • Discussions created inside discussions (#23733)

  • Fix typo in FR translation (#23711 by @Cormoran96)

  • Fixed E2E default room settings not being honoured (#23468 by @TheDigitalEagle)

  • LDAP users being disabled when an AD security policy is enabled (#23820)

  • LDAP users not being re-activated on login (#23627)

  • Missing user roles in edit user tab (#23734)

  • New specific endpoint for contactChatHistoryMessages with right permissions (#23533)

    Anyone with 'View Omnichannel Rooms' permission can see the History Messages.

  • Notifications are not being filtered (#23487)

    • Add a migration to update the Accounts_Default_User_Preferences_pushNotifications setting's value to the Accounts_Default_User_Preferences_mobileNotifications setting's value;
    • Remove the Accounts_Default_User_Preferences_mobileNotifications setting (replaced by Accounts_Default_User_Preferences_pushNotifications);
    • Rename 'mobileNotifications' user's preference to 'pushNotifications'.
  • Omnichannel business hours page breaking navigation (#23595 by @Aman-Maheshwari)

  • Omnichannel contact center navigation (#23691)

    Derives from: [FIX] Broken navigation from Directory to Omnichannel contact center #23656

    This PR includes a different approach to solving navigation problems following the same code structure and UI definitions of other "ActionButtons" components in Sidebar.

  • Omnichannel status being changed on page refresh (#23587)

  • Omnichannel webhooks can't be saved (#23641 by @Aman-Maheshwari)

  • Performance issues when running Omnichannel job queue dispatcher (#23661)

  • PhotoSwipe crashing on show (#23499)

    Waits for initial content to load before showing it.

  • Prevent UserAction.addStream without Subscription (#23705)

    When you take an Omnichannel chat from queue, the guest's typing information will appear.

  • Registration not possible when any user is blocked for multiple failed logins (#23565)

🔍 Minor changes
  • Chore: add no-bidi rule (#23695)

  • Chore: add index on appId + associations for apps_persistence collection (#23675)

  • Chore: Api definitions (#23701)

  • Chore: Bump Rocket.Chat@livechat to 1.10 (#23768)

  • Chore: Convert Fiber models to async Step 1 (#23633)

  • Chore: Generic Table (#23745)

  • Chore: Mocha testing configuration (#23706)

    We've been writing integration tests for the REST API quite regularly, but we can't say the same for UI-related modules. This PR is based on the assumption that improving the developer experience on writing tests would increase our coverage and promote the adoption even for newcomers.

    Here as summary of the proposal:

    • Change Mocha configuration files:

      • Add a base configuration (.mocharc.base.json);
      • Rename the configuration for REST API tests (mocha_end_to_end.opts.js -> .mocharc.api.js);
      • Add a configuration for client modules (.mocharc.client.js);
      • Enable ESLint for them.
    • Add a Mocha test command exclusive for client modules (npm run testunit-client);

    • Enable fast watch mode:

      • Configure ts-node to only transpile code (skip type checking);
      • Define a list of files to be watched.
    • Configure mocha environment on ESLint only for test files (required when using Mocha's globals);

    • Adopt Chai as our assertion library:

      • Unify the setup of Chai plugins (chai-spies, chai-datetime, chai-dom);
      • Replace assert with chai;
      • Replace chai.expect with expect.
    • Enable integration tests with React components:

      • Enable JSX support on our default Babel configuration;
      • Adopt testing library.
  • Chore: Rearrange module typings (#23452)

    • Move all external module declarations (definitions and augmentations) to /definition/externals;

    • Symlink some modules on /definition/externals to /ee/server/services/definition/externals Share types with /ee/server/services;

    • Use TypeScript as server code entrypoint.

  • Chore: Remove duplicated 'name' key from rate limiter logs (#23771)

  • Chore: Remove useCallbacks (#23696)

  • Chore: Type omnichannel models (#23758)

  • Chore: Update settings.ts (#23769)

  • i18n: Language update from LingoHub 🤖 on 2021-11-01Z (#23603)

  • i18n: Language update from LingoHub 🤖 on 2021-11-29Z (#23812)

  • Merge master into develop & Set version to 4.2.0-develop (#23586)

  • Regression: Units endpoint to TS (#23757)

  • Regression: "When is the chat busier" and "Users by time of day" charts are not working (#23815)

    • Fix "When is the chat busier" (Hours) and "Users by time of day" charts, which weren't displaying any data;
  • Regression: Add @rocket.chat/emitter to EE services (#23802)

  • Regression: Add trash to raw models (#23774)

  • Regression: Current Chats not Filtering (#23803)

  • Regression: Fix incorrect API path for livechat calls (#23778)

  • Regression: Fix LDAP sync route (#23775)

  • Regression: Fix sendMessagesToAdmins not in Fiber (#23770)

  • Regression: Fix sort param on omnichannel endpoints (#23789)

  • Regression: Improve AggregationCursor types (#23692)

  • Regression: Include files on EE services build (#23793)

  • Regression: Mark Livechat WebRTC video calling as alpha (#23813)

    image

👩‍💻👨‍💻 Contributors 😍

👩‍💻👨‍💻 Core Team 🤓

sampaiodiego and others added 30 commits October 28, 2021 11:40
Merge master into develop & Set version to 4.2.0-develop
#23542)

* WIP

* improve: finished the page merging and routing logic

Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
Co-authored-by: dougfabris <devfabris@gmail.com>
* Add migration to update push notification setting's value

* Update mobileNotifications preference to pushNotifications
* Show on hold metrics on analytics pages

* Add onhold chats to graphs

* make colors match cause ocd

* change way of calculating open rooms to account for onhold chats

* remove onhold chats from open chats

* fix colors

* fix summarize to remove onhold conversations
* Language update from LingoHub 🤖

Project Name: Rocket.Chat
Project Link: https://translate.lingohub.com/rocketchat/dashboard/rocket-dot-chat
User: Robot LingoHub

Easy language translations with LingoHub 🚀

* Revert ES

Co-authored-by: Robot LingoHub <robot@lingohub.com>
Co-authored-by: Diego Sampaio <chinello@gmail.com>
* Update method call for Apps-Engine method

* Update Apps-Engine
* fixed export emails

* added types

* Update app/mailer/server/api.ts

Co-authored-by: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com>

* fixed types

Co-authored-by: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com>
* [FIX] Advanced LDAP Sync Features

* lint fixes

* Update ee/server/settings/ldap.ts

Co-authored-by: Diego Sampaio <chinello@gmail.com>

* Update ee/server/settings/ldap.ts

Co-authored-by: Diego Sampaio <chinello@gmail.com>

* Removed unnecessary try..finally

Co-authored-by: Diego Sampaio <chinello@gmail.com>
#23661)

* Fix Omnichannel job queue dispatcher.

* Keep settings validation.

* Remove console.log.

* Review requests.

* Fix default setting value.
* fix omnichannel status being changed on page refresh

* rename key missing

* Remove duplicated function from models
…3389)

* added new permissions and backend api checks for said permission

* client-side validation of the permission for showing the contact center button

* logo update

* Added permissions to the correct place, as well as english description for the permission

* Update packages/rocketchat-i18n/i18n/en.i18n.json

Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com>

* changed name of the permission and it's description

* Made the permission work with the new settings code

* Removing uneeded migration

* Added back migrations to create permission

* fixing translations

* Update packages/rocketchat-i18n/i18n/en.i18n.json

Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com>

Co-authored-by: Caue Felchar <caue.felchar@rocket.chat>
Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com>
Co-authored-by: Diego Sampaio <chinello@gmail.com>
Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
…ons (#23626)

* Add departmentName query parameter and override default value

* Map livechat SMS sessions based on visitor token and department ID

* Update SMS endpoint admin description

* Fallback to default department if the target department is invalid
* fix business hour persisting UI

* eslint

* improvement

* Update BusinessHoursRouter.js

* Update EditBusinessHoursPage.js

* remove useState

Co-authored-by: Tiago Evangelista Pinto <tiago.evangelista@rocket.chat>
Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
rodrigok and others added 26 commits November 22, 2021 21:18
* [NEW] Enable LDAP manual sync to deployments without EE license

* Small code refactor

* Update api.ts

* Create api.ts

* Fix Review

Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
Co-authored-by: Diego Sampaio <chinello@gmail.com>
Co-authored-by: Diego Sampaio <chinello@gmail.com>
* Language update from LingoHub 🤖

Project Name: Rocket.Chat
Project Link: https://translate.lingohub.com/rocketchat/dashboard/rocket-dot-chat
User: Robot LingoHub

Easy language translations with LingoHub 🚀

Co-authored-by: Diego Sampaio <chinello@gmail.com>
…ts are not working (#23815)

* Regression: Fix incorrect API path for Livechat calls (#23778)

* Update ee/client/views/admin/engagementDashboard/users/UsersByTimeOfTheDaySection.tsx

Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>

Co-authored-by: Murtaza Patrawala <34130764+murtaza98@users.noreply.github.com>
Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
@lgtm-com
Copy link

lgtm-com bot commented Nov 30, 2021

This pull request introduces 1 alert and fixes 1 when merging 6be430d into 2aba8d2 - view on LGTM.com

new alerts:

  • 1 for Use of a weak cryptographic key

fixed alerts:

  • 1 for Use of a weak cryptographic key

@sampaiodiego sampaiodiego merged commit a4ad199 into master Nov 30, 2021
@sampaiodiego sampaiodiego deleted the release-4.2.0 branch November 30, 2021 04:12
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.

None yet