Rocket.Chat v4.3.0 Release Notes

  • 2021-12-28 路 7 馃帀 路 5 馃殌 路 26 馃悰 路 37 馃攳 路 28 馃懇鈥嶐煉火煈ㄢ嶐煉

    Engine versions

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

    馃帀 New features

    • APPS: Add new email event for apps (#23925)

    Introduces a new event called before an email is sent by the Mailer. Apps can intercept and modify the email that will be sent, or even prevent it from being sent altogether. For more details, check https://github.com/RocketChat/Rocket.Chat.Apps-engine/pull/461/files#diff-301e8a58164edbf315da2a43c4923f153dbc909573de1e60aa9f730f7488ac82

    • APPS: Allow apps to open contextual bar (#23843)

    Opens a contextual bar using app ui interactions (CONTEXTUAL_BAR_OPEN)

    https://user-images.githubusercontent.com/733282/146704076-d2d115f2-6ca6-4ed0-b450-81be580889a4.mp4

    • APPS: Allow Rocket.Chat Apps to register custom action buttons (#23679)

    Add an action button manager that allows apps to register custom action buttons that trigger interaction callbacks in them

    • APPS: getUserUnreadMessageCount Bridge (#23972)

    • APPS: Possibility to set room closer via Apps LivechatBridge.closeRoom (#21025)

    Add an optional param named closer into LivechatBridge.closeRoom so that it will be possible to close the room and send a close room message with the correct room closer. If the param is not passed, use the room visitor as the room closer.

    • EE: Introduce fallback department support (#23939)

    • 馃憠 Show Omnichannel room icon based on source definition (#23912)

    馃殌 Improvements

    • 馃憤 Allow e-mail channel to be used without default department. (#23945)

    Due to a missing condition in the e-mail input processing, Rocket.Chat was unable to receive e-mails from e-mail channels that did not have a default department.

    • Omnichannel Visitor Endpoints error handling (#23819)

    • Replace SortListItem and CreateListItem with ListItem (#24007)

    • 鈿★笍 Update "Message Erasure Type" setting's description (#23879)

      • Improves the "Message Erasure Type" setting's description by providing more details regarding the expected behavior of each option ("Keep Messages and User Name", "Delete All Messages" and "Remove link between user and messages");
      • Remove outdated translations (for this setting's description).
    • Webdav methods sanitization (#23924)

    The improvement modify server_url and user_id params into serverURL and userId more suitable to our camelCase pattern. Also converts the webdav methods into .ts helping us to prevent issues in the next modal rewrites efforts.

    馃洜 馃悰 Bug fixes

    • 鉃 Add CSP to authorize auto-close of CAS login window (#23215 by @goyome)

    Add the hash of the JS inside the page that won't close ( window.close(); )

    https://user-images.githubusercontent.com/73601258/144975689-912cfd73-da16-433c-899a-4d4ffac8e146.mp4

    • 鈿★笍 Custom status doesn't update properly (#23860)

    • DMs being created with username instead of user's name (#23848)

    • Email notifications settings not being honored on new DMs (#23574)

    • Error when creating an inactive user in admin panel (#23859)

      • Fix usersInRole array used to send email to activate a user.
    • 馃洜 Fix no message size limit for method sendMessageLivechat (#23558)

    • Headers already sent error when user data download is disabled (#23805)

    When using the export message tool when trying to download the file using the link sent via email if the feature "Export User Data" is disabled an error was being thrown causing the request to halt.

    This is the error shown in the logs:

      === UnHandledPromiseRejection ===
      Error [ERR_HTTP_HEADERS_SENT] [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
        at ServerResponse.setHeader (_http_outgoing.js:530:11)
        at ServerResponse.res.setHeader (/app/bundle/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/connect/lib/patch.js:134:22)
        at app/user-data-download/server/exportDownload.js:14:7
        at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 {
      code: 'ERR_HTTP_HEADERS_SENT'
      }
      ---------------------------------
      Errors like this can cause oplog processing errors.
      Setting EXIT_UNHANDLEDPROMISEREJECTION will cause the process to exit allowing your service to automatically restart the process
      Future node.js versions will automatically exit the process
      =================================
    
    • Jitsi call already ended (#23904 by @Aman-Maheshwari & @yash-rajpal)

      • Fix Jitsi timeout update -- which caused the "Jitsi call already ended" error when trying to join a call some time after its creation;
    • 馃攢 LDAP Sync doing nothing when set to only import new users. (#23823)

    • Missing custom user status ellipsis (#23831)

    ### before image

    ### after image

    • Missing edit icon in sequential thread messages (#23948)

    ### before image

    ### after image

    • Modal keeps state if reset too fast. (#23791)

    ~Queued updates so the Modal has a chance to close.~ Used a random key to ensure modal doesn't keep it's state.

    A rule on the user notification streamer was changed recently, and the check for writing on the streamer was wrong. Changed it to allow all logged users.

    Removing edit message from messageBox and local storage on messageBox destroyed.

    • Segmentation fault on CentOS 7 due to outdated sharp (#23796)

    Upgrades sharp to avoid a segmentation fault on CentOS 7 during startup related to sharp.node being loaded via process.dlopen().

    Suggested as a fix for versions 4.0.x and 4.1.x.

    • teams.leave client usage (#23959)

    • 馃殮 teams.removeMembers client usage (#23857)

    • 馃寪 Translations for App Select Settings not working (#23908)

    Derived from PR https://github.com/RocketChat/Rocket.Chat/pull/19238

    • Wrong button for non trial apps (#23861)

    This PR solves a bug on the marketplace that was happening with WhatsApp where it was displaying a trial button even though it didn't have a free trial period. The new verification I've added checks if the app is subscription-based and then checks if it has 0 trial days in all of its tiers. If it does, it shows a subscribe button. If it doesn't, it displays a trial button. Also, I've exposed the itsEnterpriseOnly flag as an extra measure in the case of apps like Facebook Messenger that are enterprise-only and consequently should show the subscribe button.
    Before: image
    After: image

    馃攳 Minor changes

    • 猬嗭笍 Bump @rocket.chat/string-helpers from 0.29.0 to 0.30.1 in /ee/server/services (#23526 by @dependabot[bot])

    • 猬嗭笍 Bump cookie-parser from 1.4.5 to 1.4.6 in /ee/server/services (#23921 by @dependabot[bot])

    • 猬嗭笍 Bump mailparser from 3.2.0 to 3.4.0 (#23466 by @dependabot[bot])

    • 猬嗭笍 Bump path-parse from 1.0.6 to 1.0.7 (#23689 by @dependabot[bot])

    • 猬嗭笍 Bump pm2 from 5.1.1 to 5.1.2 in /ee/server/services (#23289 by @dependabot[bot])

    • 猬嗭笍 Bump thehanimo/pr-title-checker from 1.2 to 1.3.4 (#23853 by @dependabot[bot])

    • Chore: added last login to users.list (#23846)

    • Chore: Bump fuselage 0.31.0 (#24046)

    • Chore: Centralize email validation functionality (#23816)

      • Create lib for validating emails
      • Modify places that validate emails to use the new central function
    • Chore: Change Menu props to accept next fuselage version (#23839)

    • Chore: Create script to add new migrations (#23822)

      • Create NPM script to add new migrations
      • TODO: Infer next migration number from file list
    • Chore: Deleted LivechatPageVisited (#23993)

    • 馃憰 Chore: Enable prefer-optional-chain ESLint rule for TypeScript files (#23786)

    Code is bad. It rots. It requires periodic maintenance. It has bugs that need to be found. New features mean old code has to be adapted. The more code you have, the more places there are for bugs to hide. The longer checkouts or compiles take. The longer it takes a new employee to make sense of your system. If you have to refactor there's more stuff to move around. Furthermore, more code often means less flexibility and functionality. This is counter-intuitive, but a lot of times a simple, elegant solution is faster and more general than the plodding mess of code produced by a programmer of lesser talent. Code is produced by engineers. To make more code requires more engineers. Engineers have n2 communication costs, and all that code they add to the system, while expanding its capability, also increases a whole basket of costs. You should do whatever possible to increase the productivity of individual programmers in terms of the expressive power of the code they write. Less code to do the same thing (and possibly better). Less programmers to hire. Less organizational communication costs.

    鈥 [Rich Skrenta][1]

    Mixing two problem domains in code is prone to errors. In this small example

      declare const y: { z: unknown } | undefined;
    
      const x = y && y.z;
    

    we're (1) checking the nullity of y and (2) attributing y.z to x, where (2) is clearly the main problem we're solving with code. The optional chaining is a good technique to handle nullity as a mere implementation detail:

      declare const y: { z: unknown } | undefined;
    
      const x = y?.z;
    

    Attributing y.z to x is more easily readable than the nullity check of y.

    This PR aims to add @typescript-eslint/prefer-optional-chain rule to ESlint configuration at warning level.

    • 鈿 Chore: Fix hasRole warning (#23914)

    • 馃殮 Chore: Remove the mobile-download-file permission (#23996)

      • Remove the mobile-download-file permission and its descriptions.
    • Chore: Replace new typography (#23756)

    • Chore: Replace typography (#24021)

    • 鈿★笍 Chore: Update Apps-Engine to latest (#24045)

    • 鈿★笍 Chore: update docker image base to latest node 12 patch (#23875)

    • 鈿★笍 Chore: Update Livechat (#23913)

    • 鈿★笍 Chore: Update pino deps (#23922)

    • Chore: Use only LivechatTriggerRaw model (#23974)

    • 鈿★笍 i18n: Language update from LingoHub 馃 on 2021-12-06Z (#23873)

    • 鈿★笍 i18n: Language update from LingoHub 馃 on 2021-12-13Z (#23930)

    • 鈿★笍 i18n: Language update from LingoHub 馃 on 2021-12-20Z (#23991)

    • 鈿★笍 i18n: Language update from LingoHub 馃 on 2021-12-27Z (#24030)

    • 馃攢 Merge master into develop & Set version to 4.3.0-develop (#23827)

    • Regression: Add migration for omni rooms with no source (#24012)

    Add a migration to add source property to all the omnichannel rooms which don't have it yet. All these rooms will have source type as other

    • Regression: Add optional chaining to possibly undefined fields (#24033)

    • Regression: addAction verification breaking rooms (#24019)

    • Regression: Ensure room action buttons only appear inside menu (#24035)

    Currently, action buttons registered by apps to appear in the ROOM_ACTION context show in the first position of the list, but since they don't have an icon they are effectively invisible in the tab bar.

    Here we change the order configuration of the button so we make sure it only shows inside the room menu

    • Regression: Fix omnichannel empty source usage (#24008)

    • 0锔忊儯 Regression: Let Meteor.absoluteUrl.defaultOptions.rootUrl as baseURI (#24009)

    • Regression: Missing padding in popover with custom template (#23877)

    Screen Shot 2021-12-06 at 14 16 40

    • 馃殮 Regression: Remove dangling console.log (#24034)

    A empty array have been printed to console due to a promise chained to console.log and console.error calls, probably for debugging purposes.

    • 馃殮 Regression: Remove self from fallback departments dropdown (#24018)

    • Regression: Toolbox render item (#23862)

    馃懇鈥嶐煉火煈ㄢ嶐煉 Contributors 馃槏

    馃懇鈥嶐煉火煈ㄢ嶐煉 Core Team 馃