Skip to content

Commit

Permalink
Merge pull request #24782 from RocketChat/release-4.5.1
Browse files Browse the repository at this point in the history
Release 4.5.1
  • Loading branch information
pierre-lehnen-rc authored Mar 10, 2022
2 parents 3901054 + 0faf4eb commit ec4397d
Show file tree
Hide file tree
Showing 41 changed files with 899 additions and 353 deletions.
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 4.5.0
ENV RC_VERSION 4.5.1

MAINTAINER buildmaster@rocket.chat

Expand Down
151 changes: 151 additions & 0 deletions .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -71306,6 +71306,157 @@
"'5.0'"
],
"pull_requests": []
},
"4.5.1": {
"node_version": "14.18.3",
"npm_version": "6.14.15",
"apps_engine_version": "1.31.0",
"mongo_versions": [
"'3.6'",
"'4.0'",
"'4.2'",
"'4.4'",
"'5.0'"
],
"pull_requests": [
{
"pr": "24760",
"title": "[FIX] Apple login script being loaded even when Apple Login is disabled.",
"userLogin": "pierre-lehnen-rc",
"milestone": "4.5.1",
"contributors": [
"pierre-lehnen-rc"
]
},
{
"pr": "24754",
"title": "Chore: Update Livechat",
"userLogin": "MartinSchoeler",
"milestone": "4.5.1",
"contributors": [
"MartinSchoeler"
]
},
{
"pr": "24683",
"title": "[FIX] no id of room closer in livechat-close message",
"userLogin": "cuonghuunguyen",
"milestone": "4.5.1",
"contributors": [
null
]
},
{
"pr": "23795",
"title": "[FIX] Reload roomslist after successful deletion of a room from admin panel.",
"userLogin": "Aman-Maheshwari",
"description": "Removed the logic for calling the `rooms.adminRooms` endPoint from the `RoomsTable` Component and moved it to its parent component `RoomsPage`.\r\nThis allows to call the endPoint `rooms.adminRooms` from `EditRoomContextBar` Component which is also has `RoomPage` Component as its parent.\r\n\r\nAlso added a succes toast message after the successful deletion of room.",
"milestone": "4.5.1",
"contributors": [
"Aman-Maheshwari",
"web-flow",
"tassoevan"
]
},
{
"pr": "24743",
"title": "[FIX] System messages are sent when adding or removing a group from a team",
"userLogin": "matheusbsilva137",
"description": "- Do not send system messages when adding or removing a new or existing _group_ from a team.",
"milestone": "4.5.1",
"contributors": [
"matheusbsilva137"
]
},
{
"pr": "24737",
"title": "[FIX] Typo and placeholder on wrap up call modal",
"userLogin": "MartinSchoeler",
"milestone": "4.5.1",
"contributors": [
"MartinSchoeler"
]
},
{
"pr": "24680",
"title": "[FIX] Show only available agents on extension association modal",
"userLogin": "KevLehman",
"milestone": "4.5.1",
"contributors": [
"KevLehman",
"tiagoevanp"
]
},
{
"pr": "24607",
"title": "[FIX] VoIP Enable/Disable setting on CallContext/CallProvider Notifications",
"userLogin": "tiagoevanp",
"milestone": "4.5.1",
"contributors": [
"tiagoevanp",
"web-flow",
"tassoevan"
]
},
{
"pr": "24677",
"title": "[FIX] Components for user search",
"userLogin": "juliajforesti",
"milestone": "4.5.1",
"contributors": [
"juliajforesti",
"tassoevan",
"web-flow"
]
},
{
"pr": "24657",
"title": "[FIX] Voip Stream Reinitialization Error",
"userLogin": "amolghode1981",
"milestone": "4.5.1",
"contributors": [
"amolghode1981"
]
},
{
"pr": "24696",
"title": "[FIX] Room's message count not being incremented on import",
"userLogin": "matheusbsilva137",
"description": "- Fix rooms' message counter not being incremented on message import.",
"milestone": "4.5.1",
"contributors": [
"matheusbsilva137"
]
},
{
"pr": "24674",
"title": "[FIX] Missing username on messages imported from Slack",
"userLogin": "matheusbsilva137",
"description": "- Fix missing sender's username on messages imported from Slack.",
"milestone": "4.5.1",
"contributors": [
"matheusbsilva137"
]
},
{
"pr": "24590",
"title": "[FIX] Duplicated 'name' log key",
"userLogin": "sampaiodiego",
"milestone": "4.5.1",
"contributors": [
"sampaiodiego"
]
},
{
"pr": "24661",
"title": "[FIX] Typo in wrap-up term",
"userLogin": "renatobecker",
"milestone": "4.5.1",
"contributors": [
"renatobecker"
]
}
]
}
}
}
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/4.5.0/download/" -o rocket.chat.tgz
curl -SLf "https://releases.rocket.chat/4.5.1/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: 4.5.0
version: 4.5.1
summary: Rocket.Chat server
description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/
confinement: strict
Expand Down
74 changes: 74 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,78 @@

# 4.5.1
`2022-03-09 · 13 🐛 · 1 🔍 · 11 👩‍💻👨‍💻`

### Engine versions
- Node: `14.18.3`
- NPM: `6.14.15`
- MongoDB: `'3.6', '4.0', '4.2', '4.4', '5.0'`
- Apps-Engine: `1.31.0`

### 🐛 Bug fixes


- Apple login script being loaded even when Apple Login is disabled. ([#24760](https://github.com/RocketChat/Rocket.Chat/pull/24760))

- Components for user search ([#24677](https://github.com/RocketChat/Rocket.Chat/pull/24677))

- Duplicated 'name' log key ([#24590](https://github.com/RocketChat/Rocket.Chat/pull/24590))

- Missing username on messages imported from Slack ([#24674](https://github.com/RocketChat/Rocket.Chat/pull/24674))

- Fix missing sender's username on messages imported from Slack.

- no id of room closer in livechat-close message ([#24683](https://github.com/RocketChat/Rocket.Chat/pull/24683))

- Reload roomslist after successful deletion of a room from admin panel. ([#23795](https://github.com/RocketChat/Rocket.Chat/pull/23795) by [@Aman-Maheshwari](https://github.com/Aman-Maheshwari))

Removed the logic for calling the `rooms.adminRooms` endPoint from the `RoomsTable` Component and moved it to its parent component `RoomsPage`.
This allows to call the endPoint `rooms.adminRooms` from `EditRoomContextBar` Component which is also has `RoomPage` Component as its parent.

Also added a succes toast message after the successful deletion of room.

- Room's message count not being incremented on import ([#24696](https://github.com/RocketChat/Rocket.Chat/pull/24696))

- Fix rooms' message counter not being incremented on message import.

- Show only available agents on extension association modal ([#24680](https://github.com/RocketChat/Rocket.Chat/pull/24680))

- System messages are sent when adding or removing a group from a team ([#24743](https://github.com/RocketChat/Rocket.Chat/pull/24743))

- Do not send system messages when adding or removing a new or existing _group_ from a team.

- Typo and placeholder on wrap up call modal ([#24737](https://github.com/RocketChat/Rocket.Chat/pull/24737))

- Typo in wrap-up term ([#24661](https://github.com/RocketChat/Rocket.Chat/pull/24661))

- VoIP Enable/Disable setting on CallContext/CallProvider Notifications ([#24607](https://github.com/RocketChat/Rocket.Chat/pull/24607))

- Voip Stream Reinitialization Error ([#24657](https://github.com/RocketChat/Rocket.Chat/pull/24657))

<details>
<summary>🔍 Minor changes</summary>


- Chore: Update Livechat ([#24754](https://github.com/RocketChat/Rocket.Chat/pull/24754))

</details>

### 👩‍💻👨‍💻 Contributors 😍

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

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

- [@KevLehman](https://github.com/KevLehman)
- [@MartinSchoeler](https://github.com/MartinSchoeler)
- [@amolghode1981](https://github.com/amolghode1981)
- [@juliajforesti](https://github.com/juliajforesti)
- [@matheusbsilva137](https://github.com/matheusbsilva137)
- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc)
- [@renatobecker](https://github.com/renatobecker)
- [@sampaiodiego](https://github.com/sampaiodiego)
- [@tassoevan](https://github.com/tassoevan)
- [@tiagoevanp](https://github.com/tiagoevanp)

# 4.5.0
`2022-02-28 · 3 🎉 · 15 🚀 · 19 🐛 · 72 🔍 · 30 👩‍💻👨‍💻`

Expand Down
46 changes: 31 additions & 15 deletions app/api/server/v1/voip/omnichannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,19 @@ API.v1.addRoute(
let user: IUser | null = null;

if (!isUserAndExtensionParams(this.bodyParams)) {
if (!this.bodyParams.username) {
return API.v1.notFound();
}
user = await Users.findOneByAgentUsername(this.bodyParams.username, {
projection: {
_id: 1,
username: 1,
},
});
} else {
if (!this.bodyParams.userId) {
return API.v1.notFound();
}
user = await Users.findOneAgentById(this.bodyParams.userId, {
projection: {
_id: 1,
Expand Down Expand Up @@ -167,33 +173,22 @@ API.v1.addRoute(
if (!extensions) {
return API.v1.failure('Error in allocated extensions');
}
return API.v1.success({ extensions });
return API.v1.success({ extensions: extensions.map((e) => e.extension) });
}
case 'available': {
let user: IUser | null = null;
if (!isUserIdndTypeParams(this.queryParams)) {
user = await Users.findOneByAgentUsername(this.queryParams.username, {
projection: { _id: 1 },
projection: { _id: 1, extension: 1 },
});
} else {
user = await Users.findOneAgentById(this.queryParams.userId, {
projection: { _id: 1 },
projection: { _id: 1, extension: 1 },
});
}

if (!user) {
return API.v1.notFound('User not found');
}

const extension = await Users.getVoipExtensionByUserId(user._id, {
projection: {
_id: 1,
username: 1,
extension: 1,
},
});
const freeExt = await LivechatVoip.getFreeExtensions();
const extensions = extension ? [extension.extension, ...freeExt] : freeExt;
const extensions = user?.extension ? [user.extension, ...freeExt] : freeExt;
return API.v1.success({ extensions });
}
default:
Expand Down Expand Up @@ -221,3 +216,24 @@ API.v1.addRoute(
},
},
);

API.v1.addRoute(
'omnichannel/agents/available',
{ authRequired: true, permissionsRequired: ['manage-agent-extension-association'] },
{
async get() {
const { offset, count } = this.getPaginationItems();
const { sort } = this.parseJsonQuery();
const { text, includeExtension = '' } = this.queryParams;

const { agents, total } = await LivechatVoip.getAvailableAgents(includeExtension, text, count, offset, sort);

return API.v1.success({
agents,
offset,
count,
total,
});
},
},
);
2 changes: 1 addition & 1 deletion app/apps/server/bridges/livechat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class AppLivechatBridge extends LivechatBridge {
protected async closeRoom(room: ILivechatRoom, comment: string, closer: IUser | undefined, appId: string): Promise<boolean> {
this.orch.debugLog(`The App ${appId} is closing a livechat room.`);

const user = closer && this.orch.getConverters()?.get('users').convertById(closer.id);
const user = closer && this.orch.getConverters()?.get('users').convertToRocketChat(closer);
const visitor = this.orch.getConverters()?.get('visitors').convertAppVisitor(room.visitor);

const closeData: any = {
Expand Down
2 changes: 1 addition & 1 deletion app/importer/server/classes/ImportDataConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export class ImportDataConverter {
}

if (userData.importIds.length) {
this.addUserToCache(userData.importIds[0], existingUser._id, existingUser.username);
this.addUserToCache(userData.importIds[0], existingUser._id, existingUser.username || userData.username);
}
}

Expand Down
9 changes: 4 additions & 5 deletions app/lib/server/functions/createRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,11 @@ export const createRoom = function (type, name, owner, members = [], readOnly, {

addUserRoles(owner._id, ['owner'], room._id);

if (room.teamId) {
const team = Promise.await(Team.getOneById(room.teamId));
Messages.createUserAddRoomToTeamWithRoomIdAndUser(team.roomId, room.name, owner);
}

if (type === 'c') {
if (room.teamId) {
const team = Promise.await(Team.getOneById(room.teamId));
Messages.createUserAddRoomToTeamWithRoomIdAndUser(team.roomId, room.name, owner);
}
Meteor.defer(() => {
callbacks.run('afterCreateChannel', owner, room);
});
Expand Down
Loading

0 comments on commit ec4397d

Please sign in to comment.