Skip to content
Closed
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.15.2
ENV RC_VERSION 3.15.3

MAINTAINER [email protected]

Expand Down
24 changes: 23 additions & 1 deletion .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -61183,6 +61183,28 @@
]
}
]
},
"3.15.3": {
"node_version": "12.22.1",
"npm_version": "6.14.1",
"apps_engine_version": "1.26.0",
"mongo_versions": [
"3.4",
"3.6",
"4.0",
"4.2"
],
"pull_requests": [
{
"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.15.2/download/" -o rocket.chat.tgz
curl -SLf "https://releases.rocket.chat/3.15.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.15.2
version: 3.15.3
summary: Rocket.Chat server
description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/
confinement: strict
Expand Down
1,646 changes: 888 additions & 758 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 @@ -188,30 +188,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.15.2"
"version": "3.15.3"
}
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
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.15.2",
"version": "3.15.3",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
Expand Down