Skip to content
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/rhscl/nodejs-8-rhel7

ENV RC_VERSION 3.6.1
ENV RC_VERSION 3.6.2

MAINTAINER buildmaster@rocket.chat

Expand Down
79 changes: 79 additions & 0 deletions .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -49264,6 +49264,85 @@
]
}
]
},
"3.6.2": {
"node_version": "12.16.1",
"npm_version": "6.14.0",
"apps_engine_version": "1.17.0",
"mongo_versions": [
"3.4",
"3.6",
"4.0"
],
"pull_requests": [
{
"pr": "18794",
"title": "[FIX] Show custom fields of invalid type",
"userLogin": "gabriellsh",
"milestone": "3.6.2",
"contributors": [
"gabriellsh"
]
},
{
"pr": "18864",
"title": "[FIX] Deactivate users that are the last owner of a room using REST API",
"userLogin": "FelipeParreira",
"description": "Allow for user deactivation through REST API (even if user is the last owner of a room)",
"milestone": "3.6.2",
"contributors": [
"FelipeParreira",
"sampaiodiego",
"web-flow"
]
},
{
"pr": "18866",
"title": "[FIX] Ignore User action from user card",
"userLogin": "pierre-lehnen-rc",
"milestone": "3.6.2",
"contributors": [
"pierre-lehnen-rc"
]
},
{
"pr": "18916",
"title": "[FIX] Version update check cron job",
"userLogin": "wreiske",
"milestone": "3.6.2",
"contributors": [
"wreiske"
]
},
{
"pr": "18918",
"title": "[FIX] Read receipts showing blank names and not marking messages as read",
"userLogin": "wreiske",
"milestone": "3.6.2",
"contributors": [
"wreiske"
]
},
{
"pr": "17377",
"title": "[FIX] Create Custom OAuth services from environment variables",
"userLogin": "mrtndwrd",
"milestone": "3.6.2",
"contributors": [
"mrtndwrd",
"web-flow"
]
},
{
"pr": "18919",
"title": "[FIX] invite-all-from and invite-all-to commands don't work with multibyte room names",
"userLogin": "FelipeParreira",
"description": "Fix slash commands (invite-all-from and invite-all-to) to accept multi-byte room names.",
"contributors": [
"FelipeParreira"
]
}
]
}
}
}
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.6.1/download/" -o rocket.chat.tgz
curl -SLf "https://releases.rocket.chat/3.6.2/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.6.1
version: 3.6.2
summary: Rocket.Chat server
description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/
confinement: strict
Expand Down
42 changes: 42 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,46 @@

# 3.6.2
`2020-09-17 · 7 🐛 · 6 👩‍💻👨‍💻`

### Engine versions
- Node: `12.16.1`
- NPM: `6.14.0`
- MongoDB: `3.4, 3.6, 4.0`
- Apps-Engine: `1.17.0`

### 🐛 Bug fixes


- Create Custom OAuth services from environment variables ([#17377](https://github.com/RocketChat/Rocket.Chat/pull/17377) by [@mrtndwrd](https://github.com/mrtndwrd))

- Deactivate users that are the last owner of a room using REST API ([#18864](https://github.com/RocketChat/Rocket.Chat/pull/18864))

Allow for user deactivation through REST API (even if user is the last owner of a room)

- Ignore User action from user card ([#18866](https://github.com/RocketChat/Rocket.Chat/pull/18866))

- invite-all-from and invite-all-to commands don't work with multibyte room names ([#18919](https://github.com/RocketChat/Rocket.Chat/pull/18919))

Fix slash commands (invite-all-from and invite-all-to) to accept multi-byte room names.

- Read receipts showing blank names and not marking messages as read ([#18918](https://github.com/RocketChat/Rocket.Chat/pull/18918) by [@wreiske](https://github.com/wreiske))

- Show custom fields of invalid type ([#18794](https://github.com/RocketChat/Rocket.Chat/pull/18794))

- Version update check cron job ([#18916](https://github.com/RocketChat/Rocket.Chat/pull/18916) by [@wreiske](https://github.com/wreiske))

### 👩‍💻👨‍💻 Contributors 😍

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

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

- [@FelipeParreira](https://github.com/FelipeParreira)
- [@gabriellsh](https://github.com/gabriellsh)
- [@pierre-lehnen-rc](https://github.com/pierre-lehnen-rc)
- [@sampaiodiego](https://github.com/sampaiodiego)

# 3.6.1
`2020-09-11 · 7 🐛 · 3 👩‍💻👨‍💻`

Expand Down
11 changes: 8 additions & 3 deletions app/api/server/v1/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ API.v1.addRoute('users.deleteOwnAccount', { authRequired: true }, {
throw new Meteor.Error('error-not-allowed', 'Not allowed');
}

const { confirmRelinquish = false } = this.requestParams();

Meteor.runAsUser(this.userId, () => {
Meteor.call('deleteUserOwnAccount', password);
Meteor.call('deleteUserOwnAccount', password, confirmRelinquish);
});

return API.v1.success();
Expand Down Expand Up @@ -133,7 +135,8 @@ API.v1.addRoute('users.setActiveStatus', { authRequired: true }, {
}

Meteor.runAsUser(this.userId, () => {
Meteor.call('setUserActiveStatus', this.bodyParams.userId, this.bodyParams.activeStatus, this.bodyParams.confirmRelinquish);
const { userId, activeStatus, confirmRelinquish = false } = this.bodyParams;
Meteor.call('setUserActiveStatus', userId, activeStatus, confirmRelinquish);
});
return API.v1.success({ user: Users.findOneById(this.bodyParams.userId, { fields: { active: 1 } }) });
},
Expand Down Expand Up @@ -463,8 +466,10 @@ API.v1.addRoute('users.update', { authRequired: true, twoFactorRequired: true },
}

if (typeof this.bodyParams.data.active !== 'undefined') {
const { userId, data: { active }, confirmRelinquish = false } = this.bodyParams;

Meteor.runAsUser(this.userId, () => {
Meteor.call('setUserActiveStatus', this.bodyParams.userId, this.bodyParams.data.active);
Meteor.call('setUserActiveStatus', userId, active, confirmRelinquish);
});
}
const { fields } = this.parseJsonQuery();
Expand Down
12 changes: 12 additions & 0 deletions app/lib/server/startup/oAuthServicesUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,15 @@ settings.get(/^Accounts_OAuth_Custom-[a-z0-9_]+/, function(key, value) {
return OAuthServicesRemove(key);// eslint-disable-line new-cap
}
});

function customOAuthServicesInit() {
// Add settings for custom OAuth providers to the settings so they get
// automatically added when they are defined in ENV variables
Object.keys(process.env).forEach((key) => {
if (/Accounts_OAuth_Custom-[a-zA-Z0-9_-]+$/.test(key)) {
settings.add(key, process.env[key]);
}
});
}

customOAuthServicesInit();
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.6.1"
"version": "3.6.2"
}
4 changes: 2 additions & 2 deletions app/version-check/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ if (SyncedCron.nextScheduledAtDate(jobName)) {
SyncedCron.remove(jobName);
}

const addVersionCheckJob = () => {
const addVersionCheckJob = Meteor.bindEnvironment(() => {
SyncedCron.add({
name: jobName,
schedule: (parser) => parser.text('at 2:00 am'),
job() {
checkVersionUpdate();
},
});
};
});


Meteor.startup(() => {
Expand Down
2 changes: 1 addition & 1 deletion client/channel/hooks/useUserInfoActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export const useUserInfoActions = (user = {}, rid) => {
const ignoreUser = useMethod('ignoreUser');
const ignoreUserAction = useMutableCallback(async () => {
try {
await ignoreUser({ rid, ignoredUser: uid, ignore: !isIgnored });
await ignoreUser({ rid, userId: uid, ignore: !isIgnored });
dispatchToastMessage({ type: 'success', message: t('User_has_been_unignored') });
} catch (error) {
dispatchToastMessage({ type: 'error', message: error });
Expand Down
14 changes: 10 additions & 4 deletions client/components/CustomFieldsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,21 @@ const CustomFieldsAssembler = ({ formValues, formHandlers, customFields, ...prop
state: formValues[key],
...value,
};
return value.type === 'text'
? <CustomTextInput {...extraProps} {...props}/>
: <CustomSelect {...extraProps} {...props}/>;

if (value.type === 'select') {
return <CustomSelect {...extraProps} {...props}/>;
}

if (value.type === 'text') {
return <CustomTextInput {...extraProps} {...props}/>;
}

return null;
});

export default function CustomFieldsForm({ customFieldsData, setCustomFieldsData, onLoadFields = () => {}, ...props }) {
const customFieldsJson = useSetting('Accounts_CustomFields');

// TODO: add deps. Left this way so that a possible change in the setting can't crash the page (useForm generates states automatically)
const [customFields] = useState(() => {
try {
return JSON.parse(customFieldsJson || '{}');
Expand Down
4 changes: 2 additions & 2 deletions imports/message-read-receipt/server/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ callbacks.add('afterSaveMessage', (message, room) => {
return message;
}, callbacks.priority.MEDIUM, 'message-read-receipt-afterSaveMessage');

callbacks.add('afterReadMessages', (rid, { userId, lastSeen }) => {
ReadReceipt.markMessagesAsRead(rid, userId, lastSeen);
callbacks.add('afterReadMessages', (rid, { uid, lastSeen }) => {
ReadReceipt.markMessagesAsRead(rid, uid, lastSeen);
}, callbacks.priority.MEDIUM, 'message-read-receipt-afterReadMessages');
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.6.1",
"version": "3.6.2",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
Expand Down
7 changes: 5 additions & 2 deletions tests/data/rooms.helper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { api, credentials, request } from './api-data';

export const createRoom = ({ name, type, username }) => {
export const createRoom = ({ name, type, username, members = [] }) => {
if (!type) {
throw new Error('"type" is required in "createRoom" test helper');
}
Expand All @@ -18,7 +18,10 @@ export const createRoom = ({ name, type, username }) => {

return request.post(api(endpoints[type]))
.set(credentials)
.send(params);
.send({
...params,
members,
});
};

export const closeRoom = ({ type, roomId }) => {
Expand Down
Loading