Skip to content

Commit

Permalink
Merge pull request #2 from RocketChat/develop
Browse files Browse the repository at this point in the history
updating the code
  • Loading branch information
Jeanstaquet committed Mar 22, 2021
2 parents 36203dd + 9bbf11a commit f0ca3f3
Show file tree
Hide file tree
Showing 25 changed files with 285 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .docker-mongo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12.18.4-buster-slim
FROM node:12.21.0-buster-slim

LABEL maintainer="buildmaster@rocket.chat"

Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12.18.4-buster-slim
FROM node:12.21.0-buster-slim

LABEL maintainer="buildmaster@rocket.chat"

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
echo "github.event_name: ${{ github.event_name }}"
cat $GITHUB_EVENT_PATH
- name: Use Node.js 12.18.4
- name: Use Node.js 12.21.0
uses: actions/setup-node@v2
with:
node-version: "12.18.4"
node-version: "12.21.0"

- uses: actions/checkout@v2

Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:

strategy:
matrix:
node-version: ["12.18.4"]
node-version: ["12.21.0"]
mongodb-version: ["3.4", "3.6", "4.0"]

steps:
Expand Down Expand Up @@ -312,10 +312,10 @@ jobs:
path: ~/.meteor
key: ${{ runner.OS }}-meteor-${{ hashFiles('.meteor/release') }}-${{ hashFiles('.github/workflows/build_and_test.yml') }}

- name: Use Node.js 12.18.4
- name: Use Node.js 12.21.0
uses: actions/setup-node@v2
with:
node-version: "12.18.4"
node-version: "12.21.0"

- name: Install Meteor
run: |
Expand Down Expand Up @@ -542,10 +542,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Use Node.js 12.18.4
- name: Use Node.js 12.21.0
uses: actions/setup-node@v2
with:
node-version: "12.18.4"
node-version: "12.21.0"

- name: Login to DockerHub
uses: docker/login-action@v1
Expand Down
28 changes: 13 additions & 15 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,28 @@ accounts-facebook@1.3.2
accounts-github@1.4.3
accounts-google@1.3.3
accounts-meteor-developer@1.4.2
accounts-password@1.6.2
accounts-password@1.7.0
accounts-twitter@1.4.2
blaze-html-templates
check@1.3.1
ddp-rate-limiter@1.0.9
ddp-common@1.4.0
dynamic-import@0.5.2
ecmascript@0.14.3
typescript@3.7.6
dynamic-import@0.6.0
ecmascript@0.15.0
typescript@4.1.2
ejson@1.1.1
email@2.0.0
fastclick@1.0.13
http@1.4.2
jquery@1.11.10
logging@1.1.20
logging@1.2.0
meteor-base@1.4.0
mobile-experience@1.1.0
mongo@1.10.0
mongo@1.10.1
random@1.2.0
rate-limit@1.0.9
reactive-dict@1.3.0
reactive-var@1.0.11
reload@1.3.0
reload@1.3.1
service-configuration@1.0.11
session@1.2.0
shell-server@0.5.0
Expand All @@ -47,7 +46,6 @@ rocketchat:version
konecty:multiple-instances-status
konecty:user-presence

deepwell:bootstrap-datepicker2
dispatch:run-as-user
jalik:ufs@1.0.2
jalik:ufs-gridfs@1.0.2
Expand All @@ -70,22 +68,22 @@ littledata:synced-cron

edgee:slingshot
jalik:ufs-local@1.0.2
accounts-base@1.7.0
accounts-base@1.8.0
accounts-oauth@1.2.0
autoupdate@1.6.0
babel-compiler@7.5.3
autoupdate@1.7.0
babel-compiler@7.6.0
google-oauth@1.3.0
htmljs
less
matb33:collection-hooks
meteorhacks:inject-initial
oauth@1.3.0
oauth@1.3.2
oauth2@1.3.0
routepolicy@1.1.0
sha@1.0.9
templating
webapp@1.9.1
webapp-hashing@1.0.9
webapp@1.10.0
webapp-hashing@1.1.0
rocketchat:oauth2-server
rocketchat:i18n
rocketchat:postcss
Expand Down
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.11.1
METEOR@2.1
44 changes: 22 additions & 22 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
accounts-base@1.7.0
accounts-base@1.8.0
accounts-facebook@1.3.2
accounts-github@1.4.3
accounts-google@1.3.3
accounts-meteor-developer@1.4.2
accounts-oauth@1.2.0
accounts-password@1.6.2
accounts-password@1.7.0
accounts-twitter@1.4.2
aldeed:simple-schema@1.5.4
allow-deny@1.1.0
autoupdate@1.6.0
babel-compiler@7.5.3
autoupdate@1.7.0
babel-compiler@7.6.0
babel-runtime@1.5.0
base64@1.0.12
binary-heap@1.0.11
Expand All @@ -25,24 +25,23 @@ check@1.3.1
coffeescript@1.0.17
dandv:caret-position@2.1.1
ddp@1.4.0
ddp-client@2.3.3
ddp-client@2.4.0
ddp-common@1.4.0
ddp-rate-limiter@1.0.9
ddp-server@2.3.2
deepwell:bootstrap-datepicker2@1.3.0
deps@1.0.12
diff-sequence@1.1.1
dispatch:run-as-user@1.1.1
dynamic-import@0.5.2
ecmascript@0.14.3
dynamic-import@0.6.0
ecmascript@0.15.0
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.11.0
ecmascript-runtime-server@0.10.0
edgee:slingshot@0.7.1
ejson@1.1.1
email@2.0.0
es5-shim@4.8.0
facebook-oauth@1.7.0
facebook-oauth@1.7.4
facts-base@1.0.1
fastclick@1.0.13
fetch@0.1.1
Expand All @@ -52,7 +51,7 @@ google-oauth@1.3.0
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.4.2
http@1.4.3
id-map@1.1.0
inter-process-messaging@0.1.1
jalik:ufs@1.0.2
Expand All @@ -71,25 +70,25 @@ less@3.0.1
littledata:synced-cron@1.5.1
livedata@1.0.18
localstorage@1.2.0
logging@1.1.20
logging@1.2.0
matb33:collection-hooks@1.0.1
mdg:validation-error@0.5.1
meteor@1.9.3
meteor-base@1.4.0
meteor-developer-oauth@1.2.1
meteor-developer-oauth@1.2.3
meteorhacks:inject-initial@1.0.4
meteorspark:util@0.2.0
minifier-css@1.5.3
minifier-js@2.6.0
minimongo@1.6.0
minimongo@1.6.1
mizzao:timesync@0.3.4
mobile-experience@1.1.0
mobile-status-bar@1.1.0
modern-browsers@0.1.5
modules@0.15.0
modules@0.16.0
modules-runtime@0.12.0
mongo@1.10.0
mongo-decimal@0.1.1
mongo@1.10.1
mongo-decimal@0.1.2
mongo-dev-server@1.1.0
mongo-id@1.0.7
mrt:reactive-store@0.0.1
Expand All @@ -98,12 +97,12 @@ nimble:restivus@0.8.12
nooitaf:colors@1.1.2_1
npm-bcrypt@0.9.3
npm-mongo@3.8.1
oauth@1.3.0
oauth@1.3.2
oauth1@1.3.0
oauth2@1.3.0
observe-sequence@1.0.16
ordered-dict@1.1.0
ostrio:cookies@2.6.0
ostrio:cookies@2.7.0
pauli:accounts-linkedin@5.0.0
pauli:linkedin-oauth@5.0.0
promise@0.11.2
Expand All @@ -112,9 +111,10 @@ raix:handlebar-helpers@0.2.5
raix:ui-dropped-event@0.0.7
random@1.2.0
rate-limit@1.0.9
react-fast-refresh@0.1.0
reactive-dict@1.3.0
reactive-var@1.0.11
reload@1.3.0
reload@1.3.1
retry@1.1.0
rocketchat:i18n@0.0.1
rocketchat:livechat@0.0.1
Expand All @@ -141,9 +141,9 @@ templating-runtime@1.3.2
templating-tools@1.1.2
tracker@1.2.0
twitter-oauth@1.2.0
typescript@3.7.6
typescript@4.1.2
ui@1.0.13
underscore@1.0.10
url@1.3.1
webapp@1.9.1
webapp-hashing@1.0.9
webapp@1.10.0
webapp-hashing@1.1.0
2 changes: 1 addition & 1 deletion .snapcraft/resources/preparenode
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

node_version="v12.18.4"
node_version="v12.21.0"

unamem="$(uname -m)"
if [[ $unamem == *aarch64* ]]; then
Expand Down
1 change: 1 addition & 0 deletions app/apps/server/converters/rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export class AppRoomsConverter {
isWaitingResponse: 'waitingResponse',
isOpen: 'open',
_USERNAMES: '_USERNAMES',
description: 'description',
isDefault: (room) => {
const result = !!room.default;
delete room.default;
Expand Down
3 changes: 1 addition & 2 deletions app/apps/server/orchestrator.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ export class AppServerOrchestrator {

debugLog(...args) {
if (this.isDebugging()) {
// eslint-disable-next-line
console.log(...args);
this.getRocketChatLogger().debug(...args);
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/lib/lib/roomTypes/direct.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class DirectMessageRoomType extends RoomTypeConfig {

getIcon(roomData) {
if (this.isGroupChat(roomData)) {
return 'team';
return 'balloon';
}
return this.icon;
}
Expand Down
47 changes: 47 additions & 0 deletions app/settings/server/raw.tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* eslint-env mocha */
import chai, { expect } from 'chai';
import spies from 'chai-spies';
import rewire from 'rewire';

chai.use(spies);

describe('Raw Settings', () => {
let rawModule;
const cache = new Map();

before('rewire deps', () => {
const spy = chai.spy(async (id) => {
if (id === '1') { return 'some-setting-value'; }
return null;
});

rawModule = rewire('./raw');
rawModule.__set__('setFromDB', spy);
rawModule.__set__('cache', cache);
});

it('should get the value from database when it isnt in cache', async () => {
const setting = await rawModule.getValue('1');

expect(setting).to.be.equal('some-setting-value');
});

it('should get the value from cache when its available', async () => {
cache.set('2', 'supeer-setting');
const setting = await rawModule.getValue('2');

expect(setting).to.be.equal('supeer-setting');
});

it('should update the value in cache', async () => {
await rawModule.updateValue('2', { value: 'not-super-setting' });

expect(cache.get('2')).to.be.equal('not-super-setting');
});

it('should not update the setting if the new value is undefined', async () => {
await rawModule.updateValue('2', {});

expect(cache.get('2')).to.be.equal('not-super-setting');
});
});
3 changes: 2 additions & 1 deletion app/ui/client/views/app/room.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,9 +888,10 @@ Meteor.startup(() => {
return;
}

const room = Rooms.findOne({ _id: rid });
let room = Rooms.findOne({ _id: rid }, { fields: { t: 1 } });

if (room?.t === 'l') {
room = Tracker.nonreactive(() => Rooms.findOne({ _id: rid }));
roomTypes.getConfig(room.t).openCustomProfileTab(this, room, room.v.username);
}
});
Expand Down
2 changes: 1 addition & 1 deletion client/hooks/useRoomIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const useRoomIcon = (room: IRoom, small = true): JSX.Element | { name: st
case 'd':
const direct = room as unknown as IDirectMessageRoom;
if (direct.uids && direct.uids.length > 2) {
return { name: 'baloon-arrow-left' };
return { name: 'balloon' };
}
if (direct.uids && direct.uids.length > 0) {
return <ReactiveUserStatus { ...{ small, uid: direct.uids.filter((uid) => uid !== room.u._id)[0] || room.u._id } as any } />;
Expand Down
Loading

0 comments on commit f0ca3f3

Please sign in to comment.