Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.10.3 #20129

Merged
merged 2 commits into from
Jan 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docker/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM registry.access.redhat.com/ubi8/nodejs-12

ENV RC_VERSION 3.10.2
ENV RC_VERSION 3.10.3

MAINTAINER buildmaster@rocket.chat

Expand Down
20 changes: 20 additions & 0 deletions .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -53903,6 +53903,26 @@
]
}
]
},
"3.10.3": {
"node_version": "12.18.4",
"npm_version": "6.14.8",
"apps_engine_version": "1.21.0-alpha.4235",
"mongo_versions": [
"3.4",
"3.6",
"4.0"
],
"pull_requests": [
{
"pr": "20128",
"title": "[FIX] User registration updating wrong subscriptions",
"userLogin": "sampaiodiego",
"contributors": [
"sampaiodiego"
]
}
]
}
}
}
2 changes: 1 addition & 1 deletion .snapcraft/resources/prepareRocketChat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

curl -SLf "https://releases.rocket.chat/3.10.2/download/" -o rocket.chat.tgz
curl -SLf "https://releases.rocket.chat/3.10.3/download/" -o rocket.chat.tgz

tar xf rocket.chat.tgz --strip 1

Expand Down
2 changes: 1 addition & 1 deletion .snapcraft/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# 5. `snapcraft snap`

name: rocketchat-server
version: 3.10.2
version: 3.10.3
summary: Rocket.Chat server
description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/
confinement: strict
Expand Down
18 changes: 18 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@

# 3.10.3
`2021-01-09 · 1 🐛 · 1 👩‍💻👨‍💻`

### Engine versions
- Node: `12.18.4`
- NPM: `6.14.8`
- MongoDB: `3.4, 3.6, 4.0`
- Apps-Engine: `1.21.0-alpha.4235`

### 🐛 Bug fixes


- User registration updating wrong subscriptions ([#20128](https://github.com/RocketChat/Rocket.Chat/pull/20128))

### 👩‍💻👨‍💻 Core Team 🤓

- [@sampaiodiego](https://github.com/sampaiodiego)

# 3.10.2
`2021-01-08 · 1 🐛 · 1 👩‍💻👨‍💻`

Expand Down
48 changes: 25 additions & 23 deletions app/lib/server/functions/saveUserIdentity.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,36 @@ export function saveUserIdentity(userId, { _id, name: rawName, username: rawUser
}

// if coming from old username, update all references
if (previousUsername && usernameChanged && typeof rawUsername !== 'undefined') {
Messages.updateAllUsernamesByUserId(user._id, username);
Messages.updateUsernameOfEditByUserId(user._id, username);
Messages.findByMention(previousUsername).forEach(function(msg) {
const updatedMsg = msg.msg.replace(new RegExp(`@${ previousUsername }`, 'ig'), `@${ username }`);
return Messages.updateUsernameAndMessageOfMentionByIdAndOldUsername(msg._id, previousUsername, username, updatedMsg);
});
Rooms.replaceUsername(previousUsername, username);
Rooms.replaceMutedUsername(previousUsername, username);
Rooms.replaceUsernameOfUserByUserId(user._id, username);
Subscriptions.setUserUsernameByUserId(user._id, username);
if (previousUsername) {
if (usernameChanged && typeof rawUsername !== 'undefined') {
Messages.updateAllUsernamesByUserId(user._id, username);
Messages.updateUsernameOfEditByUserId(user._id, username);
Messages.findByMention(previousUsername).forEach(function(msg) {
const updatedMsg = msg.msg.replace(new RegExp(`@${ previousUsername }`, 'ig'), `@${ username }`);
return Messages.updateUsernameAndMessageOfMentionByIdAndOldUsername(msg._id, previousUsername, username, updatedMsg);
});
Rooms.replaceUsername(previousUsername, username);
Rooms.replaceMutedUsername(previousUsername, username);
Rooms.replaceUsernameOfUserByUserId(user._id, username);
Subscriptions.setUserUsernameByUserId(user._id, username);

LivechatDepartmentAgents.replaceUsernameOfAgentByUserId(user._id, username);
LivechatDepartmentAgents.replaceUsernameOfAgentByUserId(user._id, username);

const fileStore = FileUpload.getStore('Avatars');
const file = fileStore.model.findOneByName(previousUsername);
if (file) {
fileStore.model.updateFileNameById(file._id, username);
const fileStore = FileUpload.getStore('Avatars');
const file = fileStore.model.findOneByName(previousUsername);
if (file) {
fileStore.model.updateFileNameById(file._id, username);
}
}
}

// update other references if either the name or username has changed
if (usernameChanged || nameChanged) {
// update name and fname of 1-on-1 direct messages
Subscriptions.updateDirectNameAndFnameByName(previousUsername, rawUsername && username, rawName && name);
// update other references if either the name or username has changed
if (usernameChanged || nameChanged) {
// update name and fname of 1-on-1 direct messages
Subscriptions.updateDirectNameAndFnameByName(previousUsername, rawUsername && username, rawName && name);

// update name and fname of group direct messages
updateGroupDMsName(user);
// update name and fname of group direct messages
updateGroupDMsName(user);
}
}

return true;
Expand Down
2 changes: 1 addition & 1 deletion app/utils/rocketchat.info
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "3.10.2"
"version": "3.10.3"
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Rocket.Chat",
"description": "The Ultimate Open Source WebChat Platform",
"version": "3.10.2",
"version": "3.10.3",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
Expand Down