forked from RocketChat/Rocket.Chat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request RocketChat#9989 from RocketChat/release-0.62.1
Release 0.62.1
- Loading branch information
Showing
13 changed files
with
60 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM rocketchat/base:8 | ||
|
||
ENV RC_VERSION 0.62.0 | ||
ENV RC_VERSION 0.62.1 | ||
|
||
MAINTAINER [email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"version": "0.62.0" | ||
"version": "0.62.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,33 @@ | ||
RocketChat.deleteUser = function(userId) { | ||
const user = RocketChat.models.Users.findOneById(userId); | ||
|
||
RocketChat.models.Messages.removeByUserId(userId); // Remove user messages | ||
RocketChat.models.Subscriptions.db.findByUserId(userId).forEach((subscription) => { | ||
const room = RocketChat.models.Rooms.findOneById(subscription.rid); | ||
if (room) { | ||
if (room.t !== 'c' && room.usernames.length === 1) { | ||
RocketChat.models.Rooms.removeById(subscription.rid); // Remove non-channel rooms with only 1 user (the one being deleted) | ||
// Users without username can't do anything, so there is nothing to remove | ||
if (user.username != null) { | ||
RocketChat.models.Messages.removeByUserId(userId); // Remove user messages | ||
RocketChat.models.Subscriptions.db.findByUserId(userId).forEach((subscription) => { | ||
const room = RocketChat.models.Rooms.findOneById(subscription.rid); | ||
if (room) { | ||
if (room.t !== 'c' && room.usernames.length === 1) { | ||
RocketChat.models.Rooms.removeById(subscription.rid); // Remove non-channel rooms with only 1 user (the one being deleted) | ||
} | ||
if (room.t === 'd') { | ||
RocketChat.models.Subscriptions.removeByRoomId(subscription.rid); | ||
RocketChat.models.Messages.removeByRoomId(subscription.rid); | ||
} | ||
} | ||
if (room.t === 'd') { | ||
RocketChat.models.Subscriptions.removeByRoomId(subscription.rid); | ||
RocketChat.models.Messages.removeByRoomId(subscription.rid); | ||
} | ||
} | ||
}); | ||
}); | ||
|
||
RocketChat.models.Subscriptions.removeByUserId(userId); // Remove user subscriptions | ||
RocketChat.models.Rooms.removeByTypeContainingUsername('d', user.username); // Remove direct rooms with the user | ||
RocketChat.models.Rooms.removeUsernameFromAll(user.username); // Remove user from all other rooms | ||
RocketChat.models.Subscriptions.removeByUserId(userId); // Remove user subscriptions | ||
RocketChat.models.Rooms.removeByTypeContainingUsername('d', user.username); // Remove direct rooms with the user | ||
RocketChat.models.Rooms.removeUsernameFromAll(user.username); // Remove user from all other rooms | ||
|
||
// removes user's avatar | ||
if (user.avatarOrigin === 'upload' || user.avatarOrigin === 'url') { | ||
FileUpload.getStore('Avatars').deleteByName(user.username); | ||
} | ||
// removes user's avatar | ||
if (user.avatarOrigin === 'upload' || user.avatarOrigin === 'url') { | ||
FileUpload.getStore('Avatars').deleteByName(user.username); | ||
} | ||
|
||
RocketChat.models.Integrations.disableByUserId(userId); // Disables all the integrations which rely on the user being deleted. | ||
RocketChat.models.Integrations.disableByUserId(userId); // Disables all the integrations which rely on the user being deleted. | ||
} | ||
|
||
RocketChat.models.Users.removeById(userId); // Remove user from users database | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
width: 1vw; | ||
|
||
height: 100%; | ||
|
||
position: relative; | ||
} | ||
|
||
.messages-container .room-icon { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4558,8 +4558,6 @@ body:not(.is-cordova) { | |
} | ||
|
||
.rc-old.full-page { | ||
z-index: 101; | ||
|
||
display: flex; | ||
|
||
width: 100%; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters