Skip to content

Commit

Permalink
Merge pull request #22521 from RocketChat/release-3.16.1
Browse files Browse the repository at this point in the history
Release 3.16.1
  • Loading branch information
sampaiodiego authored Jul 1, 2021
2 parents e1a00d3 + 5e0a6bd commit 5b903f8
Show file tree
Hide file tree
Showing 10 changed files with 212 additions and 140 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 3.16.0
ENV RC_VERSION 3.16.1

MAINTAINER buildmaster@rocket.chat

Expand Down
33 changes: 33 additions & 0 deletions .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -62190,6 +62190,39 @@
"4.2"
],
"pull_requests": []
},
"3.16.1": {
"node_version": "12.22.1",
"npm_version": "6.14.1",
"apps_engine_version": "1.27.0",
"mongo_versions": [
"3.4",
"3.6",
"4.0",
"4.2"
],
"pull_requests": [
{
"pr": "22511",
"title": "[FIX] Livechat apps permission error",
"userLogin": "d-gubert",
"description": "Updated Apps-Engine version fixes errors with apps using livechat features.",
"milestone": "3.16.1",
"contributors": [
"d-gubert",
"web-flow"
]
},
{
"pr": "22506",
"title": "[FIX] Prune messages not applying the user filter",
"userLogin": "sampaiodiego",
"milestone": "3.15.3",
"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.16.0/download/" -o rocket.chat.tgz
curl -SLf "https://releases.rocket.chat/3.16.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: 3.16.0
version: 3.16.1
summary: Rocket.Chat server
description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/
confinement: strict
Expand Down
224 changes: 128 additions & 96 deletions HISTORY.md

Large diffs are not rendered by default.

37 changes: 22 additions & 15 deletions app/api/server/v1/rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,30 +150,37 @@ API.v1.addRoute('rooms.cleanHistory', { authRequired: true }, {
post() {
const findResult = findRoomByIdOrName({ params: this.bodyParams });

if (!this.bodyParams.latest) {
const {
latest,
oldest,
inclusive = false,
limit,
excludePinned,
filesOnly,
ignoreThreads,
ignoreDiscussion,
users,
} = this.bodyParams;

if (!latest) {
return API.v1.failure('Body parameter "latest" is required.');
}

if (!this.bodyParams.oldest) {
if (!oldest) {
return API.v1.failure('Body parameter "oldest" is required.');
}

const latest = new Date(this.bodyParams.latest);
const oldest = new Date(this.bodyParams.oldest);

const inclusive = this.bodyParams.inclusive || false;

const count = Meteor.runAsUser(this.userId, () => Meteor.call('cleanRoomHistory', {
roomId: findResult._id,
latest,
oldest,
latest: new Date(latest),
oldest: new Date(oldest),
inclusive,
limit: this.bodyParams.limit,
excludePinned: [true, 'true', 1, '1'].includes(this.bodyParams.excludePinned),
filesOnly: [true, 'true', 1, '1'].includes(this.bodyParams.filesOnly),
ignoreThreads: [true, 'true', 1, '1'].includes(this.bodyParams.ignoreThreads),
ignoreDiscussion: [true, 'true', 1, '1'].includes(this.bodyParams.ignoreDiscussion),
fromUsers: this.bodyParams.users,
limit,
excludePinned: [true, 'true', 1, '1'].includes(excludePinned),
filesOnly: [true, 'true', 1, '1'].includes(filesOnly),
ignoreThreads: [true, 'true', 1, '1'].includes(ignoreThreads),
ignoreDiscussion: [true, 'true', 1, '1'].includes(ignoreDiscussion),
fromUsers: users,
}));

return API.v1.success({ count });
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.16.0"
"version": "3.16.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const PruneMessagesWithData = ({ rid, tabBar }) => {
filesOnly: attached,
ignoreDiscussion: discussion,
ignoreThreads: threads,
fromUsers: users,
users,
});

setCounter(count);
Expand Down
44 changes: 22 additions & 22 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions 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.16.0",
"version": "3.16.1",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
Expand Down Expand Up @@ -152,7 +152,7 @@
"@nivo/heatmap": "^0.61.0",
"@nivo/line": "^0.61.1",
"@nivo/pie": "^0.61.1",
"@rocket.chat/apps-engine": "1.27.0-alpha.5237",
"@rocket.chat/apps-engine": "1.27.0",
"@rocket.chat/css-in-js": "^0.27.0",
"@rocket.chat/emitter": "^0.27.0",
"@rocket.chat/fuselage": "^0.27.0",
Expand Down

0 comments on commit 5b903f8

Please sign in to comment.