From f19473c62677e2eb132fc2288c006d2f6bb34e40 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Thu, 9 May 2019 21:22:41 -0300 Subject: [PATCH] Release 1.0.3 (#14446) * [FIX] New day separator overlapping above system message (#14362) * Improve German translations (#14351) * Use the plural for discussions-section in side panel * Formal and informal translations for 1.0 * fix german typos * [FIX] Main thread title on replies (#14372) * fix * fix test * fix setting * Update tests/pageobjects/main-content.page.js Co-Authored-By: ggazzo * Update app/ui-utils/client/lib/RoomHistoryManager.js Co-Authored-By: ggazzo * [FIX] Bell was too small on threads (#14394) * [FIX] Messages on threads disappearing (#14393) * fix subscription-changed updating all messages(#14391) * Fix: Message body was not being updated when user disabled nrr message (#14390) * [NEW] Allow change Discussion's properties (#14389) * [FIX] Unnecessary meteor.defer on openRoom (#14396) * [FIX] more message actions to threads context(follow, unfollow, copy, delete) (#14387) * added more message actions to threads context * more actions * change token name (#14379) * [FIX] Pressing Enter in User Search field at channel causes reload (#14388) * Prevent default on enter in User search * Prevent form submission in membersList * If using subpath make sure streams use that also for multi-instance. Fixes #13200 (#14376) * Revert "[IMPROVE] Use SessionId for credential token in SAML request (#13791)" (#14345) This reverts commit 3967a74f5bd4214b3a1453c30bfb068c1f11646c. * Add fallback to mongo version that doesn't require clusterMonitor role (#14403) * [FIX] Users actions in administration were returning error (#14400) * Fix actions collapse into popup in userInfo * Refactor userActions * [FIX] Error 400 on send a reply to an old thread (#14402) * fix error 400 on send a reply to an old thread * ignoring properly hidden messages * [FIX] Messages on thread panel were receiving wrong context/subscription (#14404) * [FIX] preview pdf its not working (#14419) * [FIX] renderMessageBody was caching messages in wrong scenarios #14420 * LingoHub Update :rocket: (#14426) Manual push by LingoHub User: Diego Sampaio. Project: Rocket.Chat Made with :heart: by https://lingohub.com * [FIX] Mentions message missing 'jump to message' action (#14430) * fixed context * threads context * [FIX] Escape unrecognized slash command message (#14432) * Add missing german translations (#14386) * [FIX] IE11 support (#14422) * Add symlinks to ES6 node_modules imports * Add URL polyfill for IE11 * Fix thread replies for IE11 * [IMPROVE] allow users to skip activeUsers to be ready (#14431) * allow users to skip activeUsers to be ready * Update main.js * Update app/ui-master/client/main.js Co-Authored-By: ggazzo * [IMPROVE] Don't use regex to find users (#14397) * Don't use regex to find users * Invert logic on model methods * Escape username regex * Find users in batch * Use only normalizeMessagesForUser * Don't ignore username case to get owners on graphql * Fixes on DAU and MAU aggregations (#14418) * Fixes on SAU and MAU aggregations * Report new data from DAU/MAU * Run tests agains a mongodb container in CI * Try to run CI correctly * Fix drop database * Parse desktop app User Agent correctly * Fix aggregation of past sessions * Return past month today * Fix bug * Add migration * Fixed migration * Migration improvements * Fix crowd sync by using correct logging method (#14405) * Fix room names in user info dialogs (#14415) * Fix discussion name being invalid (#14442) Closes #14378 * Fix i18n files keys sort (#14433) * Add script to normalize i18n files * Fix i18n files * Set as official script * Update package-lock.json * fix (#14443) * Update threads.css * Bump version to 1.0.3 * regen changelog --- .circleci/config.yml | 3 +- .docker/Dockerfile.rhel | 2 +- .eslintignore | 1 + .github/history.json | 308 +++- .scripts/fix-i18n.js | 28 + .travis/snap.sh | 2 +- HISTORY.md | 113 +- .../helpers/composeRoomWithLastMessage.js | 5 +- app/api/server/helpers/getUserFromParams.js | 4 +- app/api/server/v1/channels.js | 7 +- app/api/server/v1/chat.js | 31 +- app/api/server/v1/groups.js | 4 +- app/api/server/v1/im.js | 6 +- app/api/server/v1/users.js | 2 +- .../server/methods/addUserToRole.js | 2 +- app/autotranslate/client/lib/actionButton.js | 2 + .../server/methods/mailMessages.js | 2 +- .../client/views/channelSettings.js | 4 +- .../server/functions/saveRoomName.js | 2 +- app/crowd/server/crowd.js | 2 +- .../server/custom_oauth_server.js | 2 +- .../client/views/DiscussionList.html | 2 +- .../hooks/propagateDiscussionMetadata.js | 2 +- .../server/methods/createDiscussion.js | 3 + app/gitlab/lib/common.js | 2 +- app/importer-csv/server/importer.js | 4 +- .../server/importer.js | 2 +- app/importer-slack-users/server/importer.js | 2 +- app/importer-slack/server/importer.js | 2 +- app/integrations/server/lib/triggerHandler.js | 4 +- app/lib/server/functions/createRoom.js | 2 +- .../server/functions/getUsernameSuggestion.js | 2 +- .../server/functions/loadMessageHistory.js | 4 +- app/lib/server/methods/addUsersToRoom.js | 2 +- app/lib/server/methods/getChannelHistory.js | 4 +- app/livechat/server/methods/searchAgent.js | 2 +- .../client/views/mentionsFlexTab.html | 2 +- .../client/views/mentionsFlexTab.js | 3 - .../client/messageAttachment.js | 4 +- app/message-star/client/actionButton.js | 8 +- .../client/saml_client.js | 5 +- .../server/saml_server.js | 4 +- app/models/server/models/Sessions.js | 521 ++++-- app/models/server/models/Sessions.mocks.js | 7 + app/models/server/models/Sessions.tests.js | 821 +++++++++ app/models/server/models/Users.js | 10 +- app/reactions/client/init.js | 1 + app/slackbridge/server/RocketAdapter.js | 4 +- app/slashcommands-kick/server/server.js | 2 +- app/slashcommands-msg/server/server.js | 2 +- app/slashcommands-mute/server/mute.js | 2 +- app/slashcommands-mute/server/unmute.js | 2 +- app/statistics/server/functions/get.js | 33 +- app/statistics/server/lib/SAUMonitor.js | 47 +- .../{UAParserMobile.js => UAParserCustom.js} | 41 +- .../server/lib/UAParserCustom.tests.js | 77 + .../imports/components/contextual-bar.css | 1 + app/theme/client/imports/general/base_old.css | 7 +- app/threads/client/flextab/thread.html | 4 +- app/threads/client/flextab/thread.js | 7 +- app/threads/client/flextab/threads.html | 6 +- app/threads/client/flextab/threads.js | 11 +- app/threads/client/messageAction/follow.js | 2 +- app/threads/client/messageAction/unfollow.js | 2 +- app/threads/client/threads.css | 9 +- app/ui-flextab/client/tabs/membersList.html | 2 +- app/ui-flextab/client/tabs/membersList.js | 7 + app/ui-flextab/client/tabs/userActions.js | 149 +- app/ui-flextab/client/tabs/userInfo.js | 23 +- app/ui-master/client/main.js | 25 +- app/ui-message/client/message.js | 79 +- .../client/messageBox/messageBox.js | 1 - .../messageBox/messageBoxNotSubscribed.js | 3 +- app/ui-utils/client/lib/MessageAction.js | 14 +- app/ui-utils/client/lib/RoomHistoryManager.js | 12 +- app/ui-utils/client/lib/RoomManager.js | 6 +- app/ui-utils/client/lib/messageContext.js | 4 +- app/ui-utils/client/lib/openRoom.js | 146 +- app/ui-utils/client/lib/renderMessageBody.js | 28 +- app/ui/client/lib/chatMessages.js | 5 +- app/ui/client/views/app/room.js | 4 +- app/utils/rocketchat.info | 2 +- app/utils/server/functions/getMongoInfo.js | 54 + app/utils/server/index.js | 2 +- .../lib/composeMessageObjectWithUser.js | 34 - .../server/lib/normalizeMessagesForUser.js | 56 + client/main.js | 2 + imports/client/limax | 1 + imports/client/map-age-cleaner | 1 + imports/client/mem | 1 + imports/client/mimic-fn | 1 + imports/client/p-defer | 1 + imports/client/p-is-promise | 1 + imports/client/pinyin | 1 + package-lock.json | 619 +++---- package.json | 6 +- packages/rocketchat-i18n/i18n/af.i18n.json | 2 +- packages/rocketchat-i18n/i18n/ar.i18n.json | 2 +- packages/rocketchat-i18n/i18n/az.i18n.json | 2 +- packages/rocketchat-i18n/i18n/be-BY.i18n.json | 2 +- packages/rocketchat-i18n/i18n/bg.i18n.json | 2 +- packages/rocketchat-i18n/i18n/bs.i18n.json | 2 +- packages/rocketchat-i18n/i18n/ca.i18n.json | 2 +- packages/rocketchat-i18n/i18n/cs.i18n.json | 2 +- packages/rocketchat-i18n/i18n/cy.i18n.json | 2 +- packages/rocketchat-i18n/i18n/da.i18n.json | 2 +- packages/rocketchat-i18n/i18n/de-AT.i18n.json | 2 +- packages/rocketchat-i18n/i18n/de-IN.i18n.json | 1604 ++++++++++------- packages/rocketchat-i18n/i18n/de.i18n.json | 90 +- packages/rocketchat-i18n/i18n/el.i18n.json | 2 +- packages/rocketchat-i18n/i18n/en.i18n.json | 2 +- packages/rocketchat-i18n/i18n/eo.i18n.json | 2 +- packages/rocketchat-i18n/i18n/es.i18n.json | 2 +- packages/rocketchat-i18n/i18n/fa.i18n.json | 2 +- packages/rocketchat-i18n/i18n/fi.i18n.json | 2 +- packages/rocketchat-i18n/i18n/fr.i18n.json | 2 +- packages/rocketchat-i18n/i18n/hu.i18n.json | 9 +- packages/rocketchat-i18n/i18n/id.i18n.json | 2 +- packages/rocketchat-i18n/i18n/ja.i18n.json | 15 +- packages/rocketchat-i18n/i18n/km.i18n.json | 12 +- packages/rocketchat-i18n/i18n/ko.i18n.json | 17 +- packages/rocketchat-i18n/i18n/ku.i18n.json | 2 +- packages/rocketchat-i18n/i18n/lo.i18n.json | 2 +- packages/rocketchat-i18n/i18n/lt.i18n.json | 2 +- packages/rocketchat-i18n/i18n/lv.i18n.json | 2 +- packages/rocketchat-i18n/i18n/mn.i18n.json | 2 +- packages/rocketchat-i18n/i18n/ms-MY.i18n.json | 2 +- packages/rocketchat-i18n/i18n/nl.i18n.json | 57 +- packages/rocketchat-i18n/i18n/no.i18n.json | 2 +- packages/rocketchat-i18n/i18n/pl.i18n.json | 4 +- packages/rocketchat-i18n/i18n/pt-BR.i18n.json | 37 +- packages/rocketchat-i18n/i18n/pt.i18n.json | 58 +- packages/rocketchat-i18n/i18n/ro.i18n.json | 2 +- packages/rocketchat-i18n/i18n/ru.i18n.json | 33 + packages/rocketchat-i18n/i18n/sk-SK.i18n.json | 2 +- packages/rocketchat-i18n/i18n/sl-SI.i18n.json | 2 +- packages/rocketchat-i18n/i18n/sq.i18n.json | 2 +- packages/rocketchat-i18n/i18n/sr.i18n.json | 2 +- packages/rocketchat-i18n/i18n/sv.i18n.json | 35 +- packages/rocketchat-i18n/i18n/ta-IN.i18n.json | 2 +- packages/rocketchat-i18n/i18n/th-TH.i18n.json | 2 +- packages/rocketchat-i18n/i18n/tr.i18n.json | 61 +- packages/rocketchat-i18n/i18n/uk.i18n.json | 2 +- packages/rocketchat-i18n/i18n/vi-VN.i18n.json | 2 +- packages/rocketchat-i18n/i18n/zh-HK.i18n.json | 2 +- packages/rocketchat-i18n/i18n/zh-TW.i18n.json | 2 +- packages/rocketchat-i18n/i18n/zh.i18n.json | 4 +- .../.app/i18n/af.i18n.json | 2 +- .../.app/i18n/ar.i18n.json | 2 +- .../.app/i18n/az.i18n.json | 2 +- .../.app/i18n/be-BY.i18n.json | 2 +- .../.app/i18n/bg.i18n.json | 2 +- .../.app/i18n/bs.i18n.json | 2 +- .../.app/i18n/ca.i18n.json | 2 +- .../.app/i18n/cs.i18n.json | 2 +- .../.app/i18n/cy.i18n.json | 2 +- .../.app/i18n/da.i18n.json | 2 +- .../.app/i18n/de-AT.i18n.json | 2 +- .../.app/i18n/de.i18n.json | 2 +- .../.app/i18n/el.i18n.json | 2 +- .../.app/i18n/en.i18n.json | 2 +- .../.app/i18n/eo.i18n.json | 2 +- .../.app/i18n/es.i18n.json | 2 +- .../.app/i18n/et.i18n.json | 2 +- .../.app/i18n/eu.i18n.json | 2 +- .../.app/i18n/fa.i18n.json | 2 +- .../.app/i18n/fi.i18n.json | 2 +- .../.app/i18n/fr.i18n.json | 2 +- .../.app/i18n/he.i18n.json | 2 +- .../.app/i18n/hi-IN.i18n.json | 2 +- .../.app/i18n/hr.i18n.json | 2 +- .../.app/i18n/hu.i18n.json | 2 +- .../.app/i18n/id.i18n.json | 2 +- .../.app/i18n/it.i18n.json | 2 +- .../.app/i18n/ja.i18n.json | 2 +- .../.app/i18n/km.i18n.json | 2 +- .../.app/i18n/ko.i18n.json | 2 +- .../.app/i18n/ku.i18n.json | 2 +- .../.app/i18n/lo.i18n.json | 2 +- .../.app/i18n/lt.i18n.json | 2 +- .../.app/i18n/lv.i18n.json | 2 +- .../.app/i18n/mn.i18n.json | 2 +- .../.app/i18n/ms-MY.i18n.json | 2 +- .../.app/i18n/nl.i18n.json | 3 +- .../.app/i18n/no.i18n.json | 2 +- .../.app/i18n/pl.i18n.json | 2 +- .../.app/i18n/pt-BR.i18n.json | 3 +- .../.app/i18n/pt.i18n.json | 3 +- .../.app/i18n/ro.i18n.json | 2 +- .../.app/i18n/ru.i18n.json | 2 +- .../.app/i18n/sk-SK.i18n.json | 2 +- .../.app/i18n/sl-SI.i18n.json | 2 +- .../.app/i18n/sq.i18n.json | 2 +- .../.app/i18n/sr.i18n.json | 2 +- .../.app/i18n/sv.i18n.json | 2 +- .../.app/i18n/ta-IN.i18n.json | 2 +- .../.app/i18n/th-TH.i18n.json | 2 +- .../.app/i18n/tr.i18n.json | 2 +- .../.app/i18n/ug.i18n.json | 2 +- .../.app/i18n/uk.i18n.json | 2 +- .../.app/i18n/vi-VN.i18n.json | 2 +- .../.app/i18n/zh-HK.i18n.json | 2 +- .../.app/i18n/zh-TW.i18n.json | 2 +- .../.app/i18n/zh.i18n.json | 2 +- server/methods/createDirectMessage.js | 2 +- server/methods/loadNextMessages.js | 4 +- server/methods/loadSurroundingMessages.js | 7 +- server/methods/muteUserInRoom.js | 2 +- server/methods/removeUserFromRoom.js | 2 +- server/methods/unmuteUserInRoom.js | 2 +- server/publications/messages.js | 8 +- server/routes/avatar/user.js | 2 +- server/startup/migrations/index.js | 1 + server/startup/migrations/v005.js | 10 +- server/startup/migrations/v144.js | 24 + server/startup/serverRunning.js | 40 +- server/stream/streamBroadcast.js | 12 +- tests/pageobjects/main-content.page.js | 7 +- 218 files changed, 4045 insertions(+), 1811 deletions(-) create mode 100644 .scripts/fix-i18n.js create mode 100644 app/models/server/models/Sessions.mocks.js create mode 100644 app/models/server/models/Sessions.tests.js rename app/statistics/server/lib/{UAParserMobile.js => UAParserCustom.js} (76%) create mode 100644 app/statistics/server/lib/UAParserCustom.tests.js create mode 100644 app/utils/server/functions/getMongoInfo.js delete mode 100644 app/utils/server/lib/composeMessageObjectWithUser.js create mode 100644 app/utils/server/lib/normalizeMessagesForUser.js create mode 120000 imports/client/limax create mode 120000 imports/client/map-age-cleaner create mode 120000 imports/client/mem create mode 120000 imports/client/mimic-fn create mode 120000 imports/client/p-defer create mode 120000 imports/client/p-is-promise create mode 120000 imports/client/pinyin create mode 100644 server/startup/migrations/v144.js diff --git a/.circleci/config.yml b/.circleci/config.yml index 739cee66a47..d2d9d39a5d3 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 875eef69996..f6c3f7c5b92 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 76f542a4915..0f9a4f4d54d 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 bb644a73624..6f54a52cbd4 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 00000000000..a4866809068 --- /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 ae6d51a54c1..f8878f95db9 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 652ce06ed5c..9f8116c4769 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 529a493d86f..8822e6d575c 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 6265f074e61..51af7c1d4e4 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 789d5c34389..6b1308dd8e5 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 d2c1b153cc8..d7258c8e74d 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 41a93d3fd9a..dba67aa913a 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 20f2f4fd56d..5b57ddea674 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 df07b51930c..3726c1ecec9 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 e1cba8a9839..84e34fc6804 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 c1983132c4b..16b10073987 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 d5a832730a1..c68cfa63d4f 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 06f1eb4ab26..806cd5682d6 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 3a3af38819f..27c73524a11 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 e60a133a7d1..11a2daac047 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 df7794f1094..a6289d872e4 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 4792f63418c..a2548cb5ec7 100644 --- a/app/discussion/client/views/DiscussionList.html +++ b/app/discussion/client/views/DiscussionList.html @@ -1,7 +1,7 @@