diff --git a/.circleci/config.yml b/.circleci/config.yml index 739cee66a47d..d2d9d39a5d3f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -69,6 +69,7 @@ jobs: <<: *defaults docker: - image: circleci/node:8.11-stretch + - image: mongo:3.2 steps: - checkout @@ -129,7 +130,7 @@ jobs: - run: name: Unit Test command: | - meteor npm run testunit + MONGO_URL=mongodb://localhost:27017 meteor npm run testunit - restore_cache: keys: diff --git a/.docker/Dockerfile.rhel b/.docker/Dockerfile.rhel index 875eef699969..f6c3f7c5b923 100644 --- a/.docker/Dockerfile.rhel +++ b/.docker/Dockerfile.rhel @@ -1,6 +1,6 @@ FROM registry.access.redhat.com/rhscl/nodejs-8-rhel7 -ENV RC_VERSION 1.0.2 +ENV RC_VERSION 1.0.3 MAINTAINER buildmaster@rocket.chat diff --git a/.eslintignore b/.eslintignore index 76f542a4915e..0f9a4f4d54d5 100644 --- a/.eslintignore +++ b/.eslintignore @@ -22,3 +22,4 @@ public/livechat/ !.scripts !packages/rocketchat-livechat/.app public/pdf.worker.min.js +imports/client/ diff --git a/.github/history.json b/.github/history.json index bb644a736249..6f54a52cbd47 100644 --- a/.github/history.json +++ b/.github/history.json @@ -15362,9 +15362,6 @@ } ] }, - "HEAD": { - "pull_requests": [] - }, "0.66.0-rc.0": { "node_version": "8.11.1", "npm_version": "5.6.0", @@ -30124,6 +30121,309 @@ ] } ] + }, + "1.0.3": { + "node_version": "8.11.4", + "npm_version": "6.4.1", + "mongo_versions": [ + "3.2", + "3.4", + "3.6", + "4.0" + ], + "pull_requests": [ + { + "pr": "14443", + "title": "[FIX] Channel Leader Bar is in the way of Thread Header ", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "14433", + "title": "Fix i18n files keys sort", + "userLogin": "sampaiodiego", + "milestone": "1.0.3", + "contributors": [ + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "14442", + "title": "[FIX] Discussion name being invalid", + "userLogin": "sampaiodiego", + "milestone": "1.0.3", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "14415", + "title": "[FIX] Room name was undefined in some info dialogs", + "userLogin": "MarcosSpessatto", + "milestone": "1.0.3", + "contributors": [ + "MarcosSpessatto" + ] + }, + { + "pr": "14405", + "title": "[FIX] Exception on crowd sync due to a wrong logging method", + "userLogin": "rodrigok", + "milestone": "1.0.3", + "contributors": [ + "rodrigok" + ] + }, + { + "pr": "14418", + "title": "Fixes on DAU and MAU aggregations", + "userLogin": "rodrigok", + "milestone": "1.0.3", + "contributors": [ + "rodrigok", + "web-flow" + ] + }, + { + "pr": "14397", + "title": "[IMPROVE] Don't use regex to find users", + "userLogin": "sampaiodiego", + "milestone": "1.0.3", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "14431", + "title": "[IMPROVE] Added flag `skipActiveUsersToBeReady` to not wait the load of `active users` to present the Web interface", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo", + "web-flow", + "tassoevan" + ] + }, + { + "pr": "14422", + "title": "[FIX] IE11 support", + "userLogin": "tassoevan", + "milestone": "1.0.3", + "contributors": [ + "tassoevan", + "web-flow" + ] + }, + { + "pr": "14386", + "title": "Add missing german translations", + "userLogin": "mrsimpson", + "milestone": "1.0.3", + "contributors": [ + "mrsimpson", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "14432", + "title": "[FIX] Escape unrecognized slash command message", + "userLogin": "tassoevan", + "milestone": "1.0.3", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "14430", + "title": "[FIX] Mentions message missing 'jump to message' action", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "14426", + "title": "LingoHub based on develop", + "userLogin": "engelgabriel", + "milestone": "1.0.3", + "contributors": [ + "sampaiodiego" + ] + }, + { + "pr": "14419", + "title": "[FIX] preview pdf its not working", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "14404", + "title": "[FIX] Messages on thread panel were receiving wrong context/subscription", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo", + "web-flow" + ] + }, + { + "pr": "14402", + "title": "[FIX] Error 400 on send a reply to an old thread", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "14400", + "title": "[FIX] Users actions in administration were returning error", + "userLogin": "tassoevan", + "milestone": "1.0.3", + "contributors": [ + "tassoevan" + ] + }, + { + "pr": "14403", + "title": "[FIX] Fallback to mongo version that doesn't require clusterMonitor role", + "userLogin": "geekgonecrazy", + "milestone": "1.0.3", + "contributors": [ + "geekgonecrazy" + ] + }, + { + "pr": "14345", + "title": "[FIX] SAML credentialToken removal was preventing mobile from being able to authenticate", + "userLogin": "geekgonecrazy", + "milestone": "1.0.3", + "contributors": [ + "geekgonecrazy", + "web-flow" + ] + }, + { + "pr": "14376", + "title": "[FIX] Stream not connecting connect when using subdir and multi-instance", + "userLogin": "geekgonecrazy", + "milestone": "1.0.3", + "contributors": [ + "geekgonecrazy" + ] + }, + { + "pr": "14388", + "title": "[FIX] Pressing Enter in User Search field at channel causes reload", + "userLogin": "MarcosSpessatto", + "milestone": "1.0.3", + "contributors": [ + "MarcosSpessatto", + "tassoevan" + ] + }, + { + "pr": "14379", + "title": "[FIX] Wrong token name was generating error on Gitlab OAuth login", + "userLogin": "MarcosSpessatto", + "milestone": "1.0.3", + "contributors": [ + "MarcosSpessatto" + ] + }, + { + "pr": "14387", + "title": "[FIX] more message actions to threads context(follow, unfollow, copy, delete)", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "14396", + "title": "[FIX] Unnecessary meteor.defer on openRoom", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "14389", + "title": "[IMPROVE] Allow change Discussion's properties", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "14390", + "title": "Fix: Message body was not being updated when user disabled nrr message", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "14393", + "title": "[FIX] Messages on threads disappearing", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "14394", + "title": "[FIX] Bell was too small on threads", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "14372", + "title": "[FIX] Main thread title on replies", + "userLogin": "ggazzo", + "milestone": "1.0.3", + "contributors": [ + "ggazzo", + "sampaiodiego", + "web-flow" + ] + }, + { + "pr": "14351", + "title": "Improve German translations", + "userLogin": "mrsimpson", + "milestone": "1.0.3", + "contributors": [ + "mrsimpson" + ] + }, + { + "pr": "14362", + "title": "[FIX] New day separator overlapping above system message", + "userLogin": "rodrigok", + "milestone": "1.0.3", + "contributors": [ + "rodrigok" + ] + } + ] } } -} \ No newline at end of file +} diff --git a/.scripts/fix-i18n.js b/.scripts/fix-i18n.js new file mode 100644 index 000000000000..a4866809068e --- /dev/null +++ b/.scripts/fix-i18n.js @@ -0,0 +1,28 @@ +/** + * This script will: + * + * - remove any duplicated i18n key on the same file; + * - re-order all keys based on source i18n file (en.i18n.json) + * - remove all keys not present in source i18n file + */ + +const fg = require('fast-glob'); +const fs = require('fs'); + +const fixFiles = (path, source, newlineAtEnd = false) => { + const sourceFile = JSON.parse(fs.readFileSync(`${ path }${ source }`, 'utf8')); + const sourceKeys = Object.keys(sourceFile); + + fg([`${ path }/**/*.i18n.json`]).then((entries) => { + entries.forEach((file) => { + console.log(file); + + const json = JSON.parse(fs.readFileSync(file, 'utf8')); + + fs.writeFileSync(file, `${ JSON.stringify(json, sourceKeys, 2) }${ newlineAtEnd ? '\n' : '' }`); + }); + }); +}; + +fixFiles('./packages/rocketchat-i18n', '/i18n/en.i18n.json'); +fixFiles('./packages/rocketchat-livechat/.app/i18n', '/en.i18n.json'); diff --git a/.travis/snap.sh b/.travis/snap.sh index ae6d51a54c10..f8878f95db90 100755 --- a/.travis/snap.sh +++ b/.travis/snap.sh @@ -17,7 +17,7 @@ elif [[ $TRAVIS_TAG ]]; then RC_VERSION=$TRAVIS_TAG else CHANNEL=edge - RC_VERSION=1.0.2 + RC_VERSION=1.0.3 fi echo "Preparing to trigger a snap release for $CHANNEL channel" diff --git a/HISTORY.md b/HISTORY.md index 652ce06ed5ca..9f8116c47690 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,4 +1,65 @@ +# 1.0.3 +`2019-05-09 · 3 🚀 · 22 🐛 · 6 🔍 · 7 👩‍💻👨‍💻` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### 🚀 Improvements + +- Don't use regex to find users ([#14397](https://github.com/RocketChat/Rocket.Chat/pull/14397)) +- Added flag `skipActiveUsersToBeReady` to not wait the load of `active users` to present the Web interface ([#14431](https://github.com/RocketChat/Rocket.Chat/pull/14431)) +- Allow change Discussion's properties ([#14389](https://github.com/RocketChat/Rocket.Chat/pull/14389)) + +### 🐛 Bug fixes + +- Channel Leader Bar is in the way of Thread Header ([#14443](https://github.com/RocketChat/Rocket.Chat/pull/14443)) +- Discussion name being invalid ([#14442](https://github.com/RocketChat/Rocket.Chat/pull/14442)) +- Room name was undefined in some info dialogs ([#14415](https://github.com/RocketChat/Rocket.Chat/pull/14415)) +- Exception on crowd sync due to a wrong logging method ([#14405](https://github.com/RocketChat/Rocket.Chat/pull/14405)) +- IE11 support ([#14422](https://github.com/RocketChat/Rocket.Chat/pull/14422)) +- Escape unrecognized slash command message ([#14432](https://github.com/RocketChat/Rocket.Chat/pull/14432)) +- Mentions message missing 'jump to message' action ([#14430](https://github.com/RocketChat/Rocket.Chat/pull/14430)) +- preview pdf its not working ([#14419](https://github.com/RocketChat/Rocket.Chat/pull/14419)) +- Messages on thread panel were receiving wrong context/subscription ([#14404](https://github.com/RocketChat/Rocket.Chat/pull/14404)) +- Error 400 on send a reply to an old thread ([#14402](https://github.com/RocketChat/Rocket.Chat/pull/14402)) +- Users actions in administration were returning error ([#14400](https://github.com/RocketChat/Rocket.Chat/pull/14400)) +- Fallback to mongo version that doesn't require clusterMonitor role ([#14403](https://github.com/RocketChat/Rocket.Chat/pull/14403)) +- SAML credentialToken removal was preventing mobile from being able to authenticate ([#14345](https://github.com/RocketChat/Rocket.Chat/pull/14345)) +- Stream not connecting connect when using subdir and multi-instance ([#14376](https://github.com/RocketChat/Rocket.Chat/pull/14376)) +- Pressing Enter in User Search field at channel causes reload ([#14388](https://github.com/RocketChat/Rocket.Chat/pull/14388)) +- Wrong token name was generating error on Gitlab OAuth login ([#14379](https://github.com/RocketChat/Rocket.Chat/pull/14379)) +- more message actions to threads context(follow, unfollow, copy, delete) ([#14387](https://github.com/RocketChat/Rocket.Chat/pull/14387)) +- Unnecessary meteor.defer on openRoom ([#14396](https://github.com/RocketChat/Rocket.Chat/pull/14396)) +- Messages on threads disappearing ([#14393](https://github.com/RocketChat/Rocket.Chat/pull/14393)) +- Bell was too small on threads ([#14394](https://github.com/RocketChat/Rocket.Chat/pull/14394)) +- Main thread title on replies ([#14372](https://github.com/RocketChat/Rocket.Chat/pull/14372)) +- New day separator overlapping above system message ([#14362](https://github.com/RocketChat/Rocket.Chat/pull/14362)) + +
+🔍 Minor changes + +- Fix i18n files keys sort ([#14433](https://github.com/RocketChat/Rocket.Chat/pull/14433)) +- Fixes on DAU and MAU aggregations ([#14418](https://github.com/RocketChat/Rocket.Chat/pull/14418)) +- Add missing german translations ([#14386](https://github.com/RocketChat/Rocket.Chat/pull/14386)) +- LingoHub based on develop ([#14426](https://github.com/RocketChat/Rocket.Chat/pull/14426)) +- Fix: Message body was not being updated when user disabled nrr message ([#14390](https://github.com/RocketChat/Rocket.Chat/pull/14390)) +- Improve German translations ([#14351](https://github.com/RocketChat/Rocket.Chat/pull/14351)) + +
+ +### 👩‍💻👨‍💻 Core Team 🤓 + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@geekgonecrazy](https://github.com/geekgonecrazy) +- [@ggazzo](https://github.com/ggazzo) +- [@mrsimpson](https://github.com/mrsimpson) +- [@rodrigok](https://github.com/rodrigok) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tassoevan](https://github.com/tassoevan) + # 1.0.2 `2019-04-30 · 2 🚀 · 8 🐛 · 5 🔍 · 10 👩‍💻👨‍💻` @@ -824,7 +885,7 @@ - Syncloud deploy option ([#12867](https://github.com/RocketChat/Rocket.Chat/pull/12867) by [@cyberb](https://github.com/cyberb)) - Config hooks for snap ([#12351](https://github.com/RocketChat/Rocket.Chat/pull/12351)) - Livechat registration form message ([#12597](https://github.com/RocketChat/Rocket.Chat/pull/12597)) -- Include message type & id in push notification payload ([#12771](https://github.com/RocketChat/Rocket.Chat/pull/12771) by [@cardoso](https://github.com/cardoso)) +- Include message type & id in push notification payload ([#12771](https://github.com/RocketChat/Rocket.Chat/pull/12771)) ### 🚀 Improvements @@ -968,7 +1029,6 @@ ### 👩‍💻👨‍💻 Contributors 😍 - [@alexbartsch](https://github.com/alexbartsch) -- [@cardoso](https://github.com/cardoso) - [@cyberb](https://github.com/cyberb) - [@hypery2k](https://github.com/hypery2k) - [@karakayasemi](https://github.com/karakayasemi) @@ -987,6 +1047,7 @@ - [@Hudell](https://github.com/Hudell) - [@LuluGO](https://github.com/LuluGO) - [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@cardoso](https://github.com/cardoso) - [@d-gubert](https://github.com/d-gubert) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) @@ -1082,7 +1143,7 @@ - Add permission to enable personal access token to specific roles ([#12309](https://github.com/RocketChat/Rocket.Chat/pull/12309)) - Option to reset e2e key ([#12483](https://github.com/RocketChat/Rocket.Chat/pull/12483)) -- /api/v1/spotlight: return joinCodeRequired field for rooms ([#12651](https://github.com/RocketChat/Rocket.Chat/pull/12651) by [@cardoso](https://github.com/cardoso)) +- /api/v1/spotlight: return joinCodeRequired field for rooms ([#12651](https://github.com/RocketChat/Rocket.Chat/pull/12651)) - New API Endpoints for the new version of JS SDK ([#12623](https://github.com/RocketChat/Rocket.Chat/pull/12623)) - Setting to configure robots.txt content ([#12547](https://github.com/RocketChat/Rocket.Chat/pull/12547)) - Make Livechat's widget draggable ([#12378](https://github.com/RocketChat/Rocket.Chat/pull/12378)) @@ -1220,7 +1281,6 @@ - [@AndreamApp](https://github.com/AndreamApp) - [@Ismaw34](https://github.com/Ismaw34) -- [@cardoso](https://github.com/cardoso) - [@imronras](https://github.com/imronras) - [@karlprieb](https://github.com/karlprieb) - [@mbrodala](https://github.com/mbrodala) @@ -1237,6 +1297,7 @@ - [@Hudell](https://github.com/Hudell) - [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@cardoso](https://github.com/cardoso) - [@engelgabriel](https://github.com/engelgabriel) - [@ggazzo](https://github.com/ggazzo) - [@marceloschmidt](https://github.com/marceloschmidt) @@ -1452,7 +1513,7 @@ 🔍 Minor changes - Release 0.70.1 ([#12270](https://github.com/RocketChat/Rocket.Chat/pull/12270) by [@edzluhan](https://github.com/edzluhan)) -- Merge master into develop & Set version to 0.71.0-develop ([#12264](https://github.com/RocketChat/Rocket.Chat/pull/12264) by [@cardoso](https://github.com/cardoso) & [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) +- Merge master into develop & Set version to 0.71.0-develop ([#12264](https://github.com/RocketChat/Rocket.Chat/pull/12264) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) - Regression: fix modal submit ([#12233](https://github.com/RocketChat/Rocket.Chat/pull/12233)) - Add reetp to the issues' bot whitelist ([#12227](https://github.com/RocketChat/Rocket.Chat/pull/12227)) - Fix: Remove semver satisfies from Apps details that is already done my marketplace ([#12268](https://github.com/RocketChat/Rocket.Chat/pull/12268)) @@ -1461,13 +1522,13 @@ ### 👩‍💻👨‍💻 Contributors 😍 -- [@cardoso](https://github.com/cardoso) - [@edzluhan](https://github.com/edzluhan) - [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) ### 👩‍💻👨‍💻 Core Team 🤓 - [@Hudell](https://github.com/Hudell) +- [@cardoso](https://github.com/cardoso) - [@ggazzo](https://github.com/ggazzo) - [@renatobecker](https://github.com/renatobecker) - [@rodrigok](https://github.com/rodrigok) @@ -1493,7 +1554,7 @@ - Allow multiple subcommands in MIGRATION_VERSION env variable ([#11184](https://github.com/RocketChat/Rocket.Chat/pull/11184) by [@arch119](https://github.com/arch119)) - Support for end to end encryption ([#10094](https://github.com/RocketChat/Rocket.Chat/pull/10094) by [@mrinaldhar](https://github.com/mrinaldhar)) - Livechat Analytics and Reports ([#11238](https://github.com/RocketChat/Rocket.Chat/pull/11238) by [@pkgodara](https://github.com/pkgodara)) -- Apps: Add handlers for message updates ([#11993](https://github.com/RocketChat/Rocket.Chat/pull/11993) by [@cardoso](https://github.com/cardoso)) +- Apps: Add handlers for message updates ([#11993](https://github.com/RocketChat/Rocket.Chat/pull/11993)) - Livechat notifications on new incoming inquiries for guest-pool ([#10588](https://github.com/RocketChat/Rocket.Chat/pull/10588)) - Customizable default directory view ([#11965](https://github.com/RocketChat/Rocket.Chat/pull/11965) by [@ohmonster](https://github.com/ohmonster)) - Blockstack as decentralized auth provider ([#12047](https://github.com/RocketChat/Rocket.Chat/pull/12047)) @@ -1552,13 +1613,13 @@
🔍 Minor changes -- Release 0.69.2 ([#12026](https://github.com/RocketChat/Rocket.Chat/pull/12026) by [@cardoso](https://github.com/cardoso) & [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) +- Release 0.69.2 ([#12026](https://github.com/RocketChat/Rocket.Chat/pull/12026) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) - LingoHub based on develop ([#11936](https://github.com/RocketChat/Rocket.Chat/pull/11936)) - Better organize package.json ([#12115](https://github.com/RocketChat/Rocket.Chat/pull/12115)) - Fix using wrong variable ([#12114](https://github.com/RocketChat/Rocket.Chat/pull/12114)) - Fix the style lint ([#11991](https://github.com/RocketChat/Rocket.Chat/pull/11991)) - Merge master into develop & Set version to 0.70.0-develop ([#11921](https://github.com/RocketChat/Rocket.Chat/pull/11921) by [@c0dzilla](https://github.com/c0dzilla) & [@rndmh3ro](https://github.com/rndmh3ro) & [@ubarsaiyan](https://github.com/ubarsaiyan) & [@vynmera](https://github.com/vynmera)) -- Release 0.69.2 ([#12026](https://github.com/RocketChat/Rocket.Chat/pull/12026) by [@cardoso](https://github.com/cardoso) & [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) +- Release 0.69.2 ([#12026](https://github.com/RocketChat/Rocket.Chat/pull/12026) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) - Regression: fix message box autogrow ([#12138](https://github.com/RocketChat/Rocket.Chat/pull/12138)) - Regression: Modal height ([#12122](https://github.com/RocketChat/Rocket.Chat/pull/12122)) - Fix: Change wording on e2e to make a little more clear ([#12124](https://github.com/RocketChat/Rocket.Chat/pull/12124)) @@ -1583,7 +1644,6 @@ - [@aferreira44](https://github.com/aferreira44) - [@arch119](https://github.com/arch119) - [@c0dzilla](https://github.com/c0dzilla) -- [@cardoso](https://github.com/cardoso) - [@crazy-max](https://github.com/crazy-max) - [@edzluhan](https://github.com/edzluhan) - [@flaviogrossi](https://github.com/flaviogrossi) @@ -1604,6 +1664,7 @@ - [@Hudell](https://github.com/Hudell) - [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) +- [@cardoso](https://github.com/cardoso) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) @@ -1629,17 +1690,17 @@ ### 🐛 Bug fixes - Reset password link error if already logged in ([#12022](https://github.com/RocketChat/Rocket.Chat/pull/12022)) -- Apps: setting with 'code' type only saving last line ([#11992](https://github.com/RocketChat/Rocket.Chat/pull/11992) by [@cardoso](https://github.com/cardoso)) +- Apps: setting with 'code' type only saving last line ([#11992](https://github.com/RocketChat/Rocket.Chat/pull/11992)) - Update user information not possible by admin if disabled to users ([#11955](https://github.com/RocketChat/Rocket.Chat/pull/11955) by [@kaiiiiiiiii](https://github.com/kaiiiiiiiii)) - Hidden admin sidenav on embedded layout ([#12025](https://github.com/RocketChat/Rocket.Chat/pull/12025)) ### 👩‍💻👨‍💻 Contributors 😍 -- [@cardoso](https://github.com/cardoso) - [@kaiiiiiiiii](https://github.com/kaiiiiiiiii) ### 👩‍💻👨‍💻 Core Team 🤓 +- [@cardoso](https://github.com/cardoso) - [@ggazzo](https://github.com/ggazzo) - [@rodrigok](https://github.com/rodrigok) - [@sampaiodiego](https://github.com/sampaiodiego) @@ -1937,7 +1998,7 @@ ### 🚀 Improvements -- Set default max upload size to 100mb ([#11327](https://github.com/RocketChat/Rocket.Chat/pull/11327) by [@cardoso](https://github.com/cardoso)) +- Set default max upload size to 100mb ([#11327](https://github.com/RocketChat/Rocket.Chat/pull/11327)) - Typing indicators now use Real Names ([#11164](https://github.com/RocketChat/Rocket.Chat/pull/11164) by [@vynmera](https://github.com/vynmera)) - Allow markdown in room topic, announcement, and description including single quotes ([#11408](https://github.com/RocketChat/Rocket.Chat/pull/11408)) @@ -1990,7 +2051,6 @@ - [@PhpXp](https://github.com/PhpXp) - [@arminfelder](https://github.com/arminfelder) - [@arungalva](https://github.com/arungalva) -- [@cardoso](https://github.com/cardoso) - [@karlprieb](https://github.com/karlprieb) - [@soundstorm](https://github.com/soundstorm) - [@tpDBL](https://github.com/tpDBL) @@ -2002,6 +2062,7 @@ - [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@MartinSchoeler](https://github.com/MartinSchoeler) - [@brunosquadros](https://github.com/brunosquadros) +- [@cardoso](https://github.com/cardoso) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) @@ -2231,7 +2292,7 @@ - Allow inviting livechat managers to the same LiveChat room ([#10956](https://github.com/RocketChat/Rocket.Chat/pull/10956)) - Cannot read property 'debug' of undefined when trying to use REST API ([#10805](https://github.com/RocketChat/Rocket.Chat/pull/10805) by [@haffla](https://github.com/haffla)) - Icons svg xml structure ([#10771](https://github.com/RocketChat/Rocket.Chat/pull/10771)) -- Remove outdated 2FA warning for mobile clients ([#10916](https://github.com/RocketChat/Rocket.Chat/pull/10916) by [@cardoso](https://github.com/cardoso)) +- Remove outdated 2FA warning for mobile clients ([#10916](https://github.com/RocketChat/Rocket.Chat/pull/10916)) - Update Sandstorm build config ([#10867](https://github.com/RocketChat/Rocket.Chat/pull/10867) by [@ocdtrekkie](https://github.com/ocdtrekkie)) - "blank messages" on iOS < 11 ([#11221](https://github.com/RocketChat/Rocket.Chat/pull/11221)) - "blank" screen on iOS < 11 ([#11199](https://github.com/RocketChat/Rocket.Chat/pull/11199)) @@ -2300,7 +2361,6 @@ - [@JoseRenan](https://github.com/JoseRenan) - [@brylie](https://github.com/brylie) - [@c0dzilla](https://github.com/c0dzilla) -- [@cardoso](https://github.com/cardoso) - [@cliffparnitzky](https://github.com/cliffparnitzky) - [@cpitman](https://github.com/cpitman) - [@filipealva](https://github.com/filipealva) @@ -2335,6 +2395,7 @@ - [@Hudell](https://github.com/Hudell) - [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@alansikora](https://github.com/alansikora) +- [@cardoso](https://github.com/cardoso) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) @@ -2416,7 +2477,7 @@ - Now is possible to access files using header authorization (`x-user-id` and `x-auth-token`) ([#10741](https://github.com/RocketChat/Rocket.Chat/pull/10741)) - Add REST API endpoints `channels.counters`, `groups.counters and `im.counters` ([#9679](https://github.com/RocketChat/Rocket.Chat/pull/9679) by [@xbolshe](https://github.com/xbolshe)) - Add REST API endpoints `channels.setCustomFields` and `groups.setCustomFields` ([#9733](https://github.com/RocketChat/Rocket.Chat/pull/9733) by [@xbolshe](https://github.com/xbolshe)) -- Add permission `view-broadcast-member-list` ([#10753](https://github.com/RocketChat/Rocket.Chat/pull/10753) by [@cardoso](https://github.com/cardoso)) +- Add permission `view-broadcast-member-list` ([#10753](https://github.com/RocketChat/Rocket.Chat/pull/10753)) ### 🐛 Bug fixes @@ -2440,7 +2501,7 @@
🔍 Minor changes -- Release 0.65.0 ([#10893](https://github.com/RocketChat/Rocket.Chat/pull/10893) by [@Sameesunkaria](https://github.com/Sameesunkaria) & [@cardoso](https://github.com/cardoso) & [@erhan-](https://github.com/erhan-) & [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb) & [@peccu](https://github.com/peccu) & [@winterstefan](https://github.com/winterstefan)) +- Release 0.65.0 ([#10893](https://github.com/RocketChat/Rocket.Chat/pull/10893) by [@Sameesunkaria](https://github.com/Sameesunkaria) & [@erhan-](https://github.com/erhan-) & [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb) & [@peccu](https://github.com/peccu) & [@winterstefan](https://github.com/winterstefan)) - Apps: Command Previews, Message and Room Removal Events ([#10822](https://github.com/RocketChat/Rocket.Chat/pull/10822)) - Develop sync ([#10815](https://github.com/RocketChat/Rocket.Chat/pull/10815) by [@nsuchy](https://github.com/nsuchy)) - Major dependencies update ([#10661](https://github.com/RocketChat/Rocket.Chat/pull/10661)) @@ -2464,7 +2525,6 @@ - [@Sameesunkaria](https://github.com/Sameesunkaria) - [@ThomasRoehl](https://github.com/ThomasRoehl) - [@c0dzilla](https://github.com/c0dzilla) -- [@cardoso](https://github.com/cardoso) - [@cfunkles](https://github.com/cfunkles) - [@chuckAtCataworx](https://github.com/chuckAtCataworx) - [@erhan-](https://github.com/erhan-) @@ -2480,6 +2540,7 @@ - [@Hudell](https://github.com/Hudell) - [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@cardoso](https://github.com/cardoso) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) @@ -2498,11 +2559,11 @@ ### 🎉 New features -- Add REST endpoints `channels.roles` & `groups.roles` ([#10607](https://github.com/RocketChat/Rocket.Chat/pull/10607) by [@cardoso](https://github.com/cardoso)) +- Add REST endpoints `channels.roles` & `groups.roles` ([#10607](https://github.com/RocketChat/Rocket.Chat/pull/10607)) - Add more options for Wordpress OAuth configuration ([#10724](https://github.com/RocketChat/Rocket.Chat/pull/10724)) - Setup Wizard ([#10523](https://github.com/RocketChat/Rocket.Chat/pull/10523) by [@karlprieb](https://github.com/karlprieb)) - Improvements to notifications logic ([#10686](https://github.com/RocketChat/Rocket.Chat/pull/10686)) -- Add REST endpoints `channels.roles` & `groups.roles` ([#10607](https://github.com/RocketChat/Rocket.Chat/pull/10607) by [@cardoso](https://github.com/cardoso)) +- Add REST endpoints `channels.roles` & `groups.roles` ([#10607](https://github.com/RocketChat/Rocket.Chat/pull/10607)) - Add more options for Wordpress OAuth configuration ([#10724](https://github.com/RocketChat/Rocket.Chat/pull/10724)) - Setup Wizard ([#10523](https://github.com/RocketChat/Rocket.Chat/pull/10523) by [@karlprieb](https://github.com/karlprieb)) - Improvements to notifications logic ([#10686](https://github.com/RocketChat/Rocket.Chat/pull/10686)) @@ -2529,7 +2590,7 @@
🔍 Minor changes -- Release 0.64.2 ([#10812](https://github.com/RocketChat/Rocket.Chat/pull/10812) by [@Sameesunkaria](https://github.com/Sameesunkaria) & [@cardoso](https://github.com/cardoso) & [@erhan-](https://github.com/erhan-) & [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb) & [@peccu](https://github.com/peccu) & [@winterstefan](https://github.com/winterstefan)) +- Release 0.64.2 ([#10812](https://github.com/RocketChat/Rocket.Chat/pull/10812) by [@Sameesunkaria](https://github.com/Sameesunkaria) & [@erhan-](https://github.com/erhan-) & [@gdelavald](https://github.com/gdelavald) & [@karlprieb](https://github.com/karlprieb) & [@peccu](https://github.com/peccu) & [@winterstefan](https://github.com/winterstefan)) - Prometheus: Add metric to track hooks time ([#10798](https://github.com/RocketChat/Rocket.Chat/pull/10798)) - Regression: Autorun of wizard was not destroyed after completion ([#10802](https://github.com/RocketChat/Rocket.Chat/pull/10802)) - Prometheus: Fix notification metric ([#10803](https://github.com/RocketChat/Rocket.Chat/pull/10803)) @@ -2566,7 +2627,6 @@ ### 👩‍💻👨‍💻 Contributors 😍 - [@Sameesunkaria](https://github.com/Sameesunkaria) -- [@cardoso](https://github.com/cardoso) - [@erhan-](https://github.com/erhan-) - [@gdelavald](https://github.com/gdelavald) - [@karlprieb](https://github.com/karlprieb) @@ -2577,6 +2637,7 @@ - [@Hudell](https://github.com/Hudell) - [@MarcosSpessatto](https://github.com/MarcosSpessatto) +- [@cardoso](https://github.com/cardoso) - [@engelgabriel](https://github.com/engelgabriel) - [@rafaelks](https://github.com/rafaelks) - [@rodrigok](https://github.com/rodrigok) @@ -2704,7 +2765,7 @@ - Release 0.64.0 ([#10613](https://github.com/RocketChat/Rocket.Chat/pull/10613) by [@christianh814](https://github.com/christianh814) & [@gdelavald](https://github.com/gdelavald) & [@tttt-conan](https://github.com/tttt-conan)) - Regression: Various search provider fixes ([#10591](https://github.com/RocketChat/Rocket.Chat/pull/10591) by [@tkurz](https://github.com/tkurz)) -- Regression: /api/v1/settings.oauth not sending needed info for SAML & CAS ([#10596](https://github.com/RocketChat/Rocket.Chat/pull/10596) by [@cardoso](https://github.com/cardoso)) +- Regression: /api/v1/settings.oauth not sending needed info for SAML & CAS ([#10596](https://github.com/RocketChat/Rocket.Chat/pull/10596)) - Regression: Apps and Livechats not getting along well with each other ([#10598](https://github.com/RocketChat/Rocket.Chat/pull/10598)) - Development: Add Visual Studio Code debugging configuration ([#10586](https://github.com/RocketChat/Rocket.Chat/pull/10586)) - Included missing lib for migrations ([#10532](https://github.com/RocketChat/Rocket.Chat/pull/10532)) @@ -2725,7 +2786,7 @@ - Regression: Revert announcement structure ([#10544](https://github.com/RocketChat/Rocket.Chat/pull/10544) by [@gdelavald](https://github.com/gdelavald)) - Regression: Upload was not working ([#10543](https://github.com/RocketChat/Rocket.Chat/pull/10543)) - Deps update ([#10549](https://github.com/RocketChat/Rocket.Chat/pull/10549)) -- Regression: /api/v1/settings.oauth not returning clientId for Twitter ([#10560](https://github.com/RocketChat/Rocket.Chat/pull/10560) by [@cardoso](https://github.com/cardoso)) +- Regression: /api/v1/settings.oauth not returning clientId for Twitter ([#10560](https://github.com/RocketChat/Rocket.Chat/pull/10560)) - Regression: Webhooks breaking due to restricted test ([#10555](https://github.com/RocketChat/Rocket.Chat/pull/10555)) - Regression: Rooms and Apps weren't playing nice with each other ([#10559](https://github.com/RocketChat/Rocket.Chat/pull/10559)) - Regression: Fix announcement bar being displayed without content ([#10554](https://github.com/RocketChat/Rocket.Chat/pull/10554) by [@gdelavald](https://github.com/gdelavald)) @@ -2743,7 +2804,6 @@ - [@abernix](https://github.com/abernix) - [@brendangadd](https://github.com/brendangadd) - [@c0dzilla](https://github.com/c0dzilla) -- [@cardoso](https://github.com/cardoso) - [@christianh814](https://github.com/christianh814) - [@dschuan](https://github.com/dschuan) - [@gdelavald](https://github.com/gdelavald) @@ -2763,6 +2823,7 @@ - [@Hudell](https://github.com/Hudell) - [@MarcosSpessatto](https://github.com/MarcosSpessatto) - [@TwizzyDizzy](https://github.com/TwizzyDizzy) +- [@cardoso](https://github.com/cardoso) - [@engelgabriel](https://github.com/engelgabriel) - [@geekgonecrazy](https://github.com/geekgonecrazy) - [@ggazzo](https://github.com/ggazzo) diff --git a/app/api/server/helpers/composeRoomWithLastMessage.js b/app/api/server/helpers/composeRoomWithLastMessage.js index 529a493d86fd..8822e6d575cc 100644 --- a/app/api/server/helpers/composeRoomWithLastMessage.js +++ b/app/api/server/helpers/composeRoomWithLastMessage.js @@ -1,9 +1,10 @@ -import { composeMessageObjectWithUser } from '../../../utils'; +import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; import { API } from '../api'; API.helperMethods.set('composeRoomWithLastMessage', function _composeRoomWithLastMessage(room, userId) { if (room.lastMessage) { - room.lastMessage = composeMessageObjectWithUser(room.lastMessage, userId); + const [lastMessage] = normalizeMessagesForUser([room.lastMessage], userId); + room.lastMessage = lastMessage; } return room; }); diff --git a/app/api/server/helpers/getUserFromParams.js b/app/api/server/helpers/getUserFromParams.js index 6265f074e615..51af7c1d4e41 100644 --- a/app/api/server/helpers/getUserFromParams.js +++ b/app/api/server/helpers/getUserFromParams.js @@ -11,9 +11,9 @@ API.helperMethods.set('getUserFromParams', function _getUserFromParams() { if (params.userId && params.userId.trim()) { user = Users.findOneById(params.userId) || doesntExist; } else if (params.username && params.username.trim()) { - user = Users.findOneByUsername(params.username) || doesntExist; + user = Users.findOneByUsernameIgnoringCase(params.username) || doesntExist; } else if (params.user && params.user.trim()) { - user = Users.findOneByUsername(params.user) || doesntExist; + user = Users.findOneByUsernameIgnoringCase(params.user) || doesntExist; } else { throw new Meteor.Error('error-user-param-not-provided', 'The required "userId" or "username" param was not provided'); } diff --git a/app/api/server/v1/channels.js b/app/api/server/v1/channels.js index 789d5c343892..6b1308dd8e53 100644 --- a/app/api/server/v1/channels.js +++ b/app/api/server/v1/channels.js @@ -1,7 +1,7 @@ import { Meteor } from 'meteor/meteor'; import { Rooms, Subscriptions, Messages, Uploads, Integrations, Users } from '../../../models'; import { hasPermission } from '../../../authorization'; -import { composeMessageObjectWithUser } from '../../../utils'; +import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; import { API } from '../api'; import _ from 'underscore'; @@ -28,7 +28,8 @@ function findChannelByIdOrName({ params, checkedArchived = true, userId }) { throw new Meteor.Error('error-room-archived', `The channel, ${ room.name }, is archived`); } if (userId && room.lastMessage) { - room.lastMessage = composeMessageObjectWithUser(room.lastMessage, userId); + const [lastMessage] = normalizeMessagesForUser([room.lastMessage], userId); + room.lastMessage = lastMessage; } return room; @@ -578,7 +579,7 @@ API.v1.addRoute('channels.messages', { authRequired: true }, { const messages = cursor.fetch(); return API.v1.success({ - messages: messages.map((record) => composeMessageObjectWithUser(record, this.userId)), + messages: normalizeMessagesForUser(messages, this.userId), count: messages.length, offset, total, diff --git a/app/api/server/v1/chat.js b/app/api/server/v1/chat.js index d2c1b153cc8f..d7258c8e74d4 100644 --- a/app/api/server/v1/chat.js +++ b/app/api/server/v1/chat.js @@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor'; import { Match, check } from 'meteor/check'; import { Messages } from '../../../models'; import { canAccessRoom, hasPermission } from '../../../authorization'; -import { composeMessageObjectWithUser } from '../../../utils'; +import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; import { processWebhookMessage } from '../../../lib'; import { API } from '../api'; import Rooms from '../../../models/server/models/Rooms'; @@ -68,8 +68,8 @@ API.v1.addRoute('chat.syncMessages', { authRequired: true }, { return API.v1.success({ result: { - updated: result.updated.map((message) => composeMessageObjectWithUser(message, this.userId)), - deleted: result.deleted.map((message) => composeMessageObjectWithUser(message, this.userId)), + updated: normalizeMessagesForUser(result.updated, this.userId), + deleted: normalizeMessagesForUser(result.deleted, this.userId), }, }); }, @@ -90,8 +90,10 @@ API.v1.addRoute('chat.getMessage', { authRequired: true }, { return API.v1.failure(); } + const [message] = normalizeMessagesForUser([msg], this.userId); + return API.v1.success({ - message: composeMessageObjectWithUser(msg, this.userId), + message, }); }, }); @@ -111,8 +113,10 @@ API.v1.addRoute('chat.pinMessage', { authRequired: true }, { let pinnedMessage; Meteor.runAsUser(this.userId, () => pinnedMessage = Meteor.call('pinMessage', msg)); + const [message] = normalizeMessagesForUser([pinnedMessage], this.userId); + return API.v1.success({ - message: composeMessageObjectWithUser(pinnedMessage, this.userId), + message, }); }, }); @@ -125,10 +129,12 @@ API.v1.addRoute('chat.postMessage', { authRequired: true }, { return API.v1.failure('unknown-error'); } + const [message] = normalizeMessagesForUser([messageReturn.message], this.userId); + return API.v1.success({ ts: Date.now(), channel: messageReturn.channel, - message: composeMessageObjectWithUser(messageReturn.message, this.userId), + message, }); }, }); @@ -150,7 +156,7 @@ API.v1.addRoute('chat.search', { authRequired: true }, { Meteor.runAsUser(this.userId, () => result = Meteor.call('messageSearch', searchText, roomId, count).message.docs); return API.v1.success({ - messages: result.map((message) => composeMessageObjectWithUser(message, this.userId)), + messages: normalizeMessagesForUser(result, this.userId), }); }, }); @@ -164,11 +170,12 @@ API.v1.addRoute('chat.sendMessage', { authRequired: true }, { throw new Meteor.Error('error-invalid-params', 'The "message" parameter must be provided.'); } - let message; - Meteor.runAsUser(this.userId, () => message = Meteor.call('sendMessage', this.bodyParams.message)); + const sent = Meteor.runAsUser(this.userId, () => Meteor.call('sendMessage', this.bodyParams.message)); + + const [message] = normalizeMessagesForUser([sent], this.userId); return API.v1.success({ - message: composeMessageObjectWithUser(message, this.userId), + message, }); }, }); @@ -259,8 +266,10 @@ API.v1.addRoute('chat.update', { authRequired: true }, { Meteor.call('updateMessage', { _id: msg._id, msg: this.bodyParams.text, rid: msg.rid }); }); + const [message] = normalizeMessagesForUser([Messages.findOneById(msg._id)], this.userId); + return API.v1.success({ - message: composeMessageObjectWithUser(Messages.findOneById(msg._id), this.userId), + message, }); }, }); diff --git a/app/api/server/v1/groups.js b/app/api/server/v1/groups.js index 41a93d3fd9a8..dba67aa913a9 100644 --- a/app/api/server/v1/groups.js +++ b/app/api/server/v1/groups.js @@ -4,7 +4,7 @@ import { Meteor } from 'meteor/meteor'; import { Subscriptions, Rooms, Messages, Uploads, Integrations, Users } from '../../../models/server'; import { hasPermission, canAccessRoom } from '../../../authorization/server'; -import { composeMessageObjectWithUser } from '../../../utils/server'; +import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; import { API } from '../api'; @@ -528,7 +528,7 @@ API.v1.addRoute('groups.messages', { authRequired: true }, { }).fetch(); return API.v1.success({ - messages: messages.map((message) => composeMessageObjectWithUser(message, this.userId)), + messages: normalizeMessagesForUser(messages, this.userId), count: messages.length, offset, total: Messages.find(ourQuery).count(), diff --git a/app/api/server/v1/im.js b/app/api/server/v1/im.js index 20f2f4fd56d2..5b57ddea6745 100644 --- a/app/api/server/v1/im.js +++ b/app/api/server/v1/im.js @@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor'; import { getRoomByNameOrIdWithOptionToJoin } from '../../../lib'; import { Subscriptions, Uploads, Users, Messages, Rooms } from '../../../models'; import { hasPermission } from '../../../authorization'; -import { composeMessageObjectWithUser } from '../../../utils'; +import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser'; import { settings } from '../../../settings'; import { API } from '../api'; @@ -234,7 +234,7 @@ API.v1.addRoute(['dm.messages', 'im.messages'], { authRequired: true }, { }).fetch(); return API.v1.success({ - messages: messages.map((message) => composeMessageObjectWithUser(message, this.userId)), + messages: normalizeMessagesForUser(messages, this.userId), count: messages.length, offset, total: Messages.find(ourQuery).count(), @@ -274,7 +274,7 @@ API.v1.addRoute(['dm.messages.others', 'im.messages.others'], { authRequired: tr }).fetch(); return API.v1.success({ - messages: msgs.map((message) => composeMessageObjectWithUser(message, this.userId)), + messages: normalizeMessagesForUser(msgs, this.userId), offset, count: msgs.length, total: Messages.find(ourQuery).count(), diff --git a/app/api/server/v1/users.js b/app/api/server/v1/users.js index df07b51930c0..3726c1ecec93 100644 --- a/app/api/server/v1/users.js +++ b/app/api/server/v1/users.js @@ -282,7 +282,7 @@ API.v1.addRoute('users.setAvatar', { authRequired: true }, { return Users.findOneById(fields.userId, { _id: 1 }); } if (fields.username) { - return Users.findOneByUsername(fields.username, { _id: 1 }); + return Users.findOneByUsernameIgnoringCase(fields.username, { _id: 1 }); } }; diff --git a/app/authorization/server/methods/addUserToRole.js b/app/authorization/server/methods/addUserToRole.js index e1cba8a9839c..84e34fc68048 100644 --- a/app/authorization/server/methods/addUserToRole.js +++ b/app/authorization/server/methods/addUserToRole.js @@ -27,7 +27,7 @@ Meteor.methods({ }); } - const user = Users.findOneByUsername(username, { + const user = Users.findOneByUsernameIgnoringCase(username, { fields: { _id: 1, }, diff --git a/app/autotranslate/client/lib/actionButton.js b/app/autotranslate/client/lib/actionButton.js index c1983132c4bd..16b100739870 100644 --- a/app/autotranslate/client/lib/actionButton.js +++ b/app/autotranslate/client/lib/actionButton.js @@ -17,6 +17,7 @@ Meteor.startup(function() { context: [ 'message', 'message-mobile', + 'threads', ], action() { const { msg: message } = messageArgs(this); @@ -41,6 +42,7 @@ Meteor.startup(function() { context: [ 'message', 'message-mobile', + 'threads', ], action() { const { msg: message } = messageArgs(this); diff --git a/app/channel-settings-mail-messages/server/methods/mailMessages.js b/app/channel-settings-mail-messages/server/methods/mailMessages.js index d5a832730a18..c68cfa63d4ff 100644 --- a/app/channel-settings-mail-messages/server/methods/mailMessages.js +++ b/app/channel-settings-mail-messages/server/methods/mailMessages.js @@ -41,7 +41,7 @@ Meteor.methods({ const missing = []; if (data.to_users.length > 0) { _.each(data.to_users, (username) => { - const user = Users.findOneByUsername(username); + const user = Users.findOneByUsernameIgnoringCase(username); if (user && user.emails && user.emails[0] && user.emails[0].address) { emails.push(user.emails[0].address); } else { diff --git a/app/channel-settings/client/views/channelSettings.js b/app/channel-settings/client/views/channelSettings.js index 06f1eb4ab265..806cd5682d6b 100644 --- a/app/channel-settings/client/views/channelSettings.js +++ b/app/channel-settings/client/views/channelSettings.js @@ -29,8 +29,8 @@ const common = { return roomType && roomTypes.roomTypes[roomType].canBeDeleted(hasPermission, room); }, canEditRoom() { - const { _id, prid } = Template.instance().room; - return !prid && hasAllPermission('edit-room', _id); + const { _id } = Template.instance().room; + return hasAllPermission('edit-room', _id); }, isDirectMessage() { const { room: { t } } = Template.instance(); diff --git a/app/channel-settings/server/functions/saveRoomName.js b/app/channel-settings/server/functions/saveRoomName.js index 3a3af38819ff..27c73524a115 100644 --- a/app/channel-settings/server/functions/saveRoomName.js +++ b/app/channel-settings/server/functions/saveRoomName.js @@ -27,6 +27,6 @@ export const saveRoomName = function(rid, displayName, user, sendMessage = true) if (sendMessage) { Messages.createRoomRenamedWithRoomIdRoomNameAndUser(rid, displayName, user); } - callbacks.run('afterRoomNameChange', { rid, name: displayName }); + callbacks.run('afterRoomNameChange', { rid, name: displayName, oldName: room.name }); return displayName; }; diff --git a/app/crowd/server/crowd.js b/app/crowd/server/crowd.js index e60a133a7d1e..11a2daac0471 100644 --- a/app/crowd/server/crowd.js +++ b/app/crowd/server/crowd.js @@ -201,7 +201,7 @@ export class CROWD { const response = self.crowdClient.searchSync('user', `email=" ${ email } "`); if (!response || response.users.length === 0) { - logger.warning('Could not find user in CROWD with username or email:', crowd_username, email); + logger.warn('Could not find user in CROWD with username or email:', crowd_username, email); return; } crowd_username = response.users[0].name; diff --git a/app/custom-oauth/server/custom_oauth_server.js b/app/custom-oauth/server/custom_oauth_server.js index df7794f1094a..a6289d872e4a 100644 --- a/app/custom-oauth/server/custom_oauth_server.js +++ b/app/custom-oauth/server/custom_oauth_server.js @@ -345,7 +345,7 @@ export class CustomOAuth { } if (serviceData.username) { - const user = Users.findOneByUsername(serviceData.username); + const user = Users.findOneByUsernameIgnoringCase(serviceData.username); if (!user) { return; } diff --git a/app/discussion/client/views/DiscussionList.html b/app/discussion/client/views/DiscussionList.html index 4792f63418ce..a2548cb5ec72 100644 --- a/app/discussion/client/views/DiscussionList.html +++ b/app/discussion/client/views/DiscussionList.html @@ -1,7 +1,7 @@