Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.68.4 #11743

Merged
merged 4 commits into from
Aug 10, 2018
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 0.68.3
ENV RC_VERSION 0.68.4

MAINTAINER [email protected]

Expand Down
54 changes: 54 additions & 0 deletions .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -17681,6 +17681,15 @@
"node_version": "8.11.3",
"npm_version": "5.6.0",
"pull_requests": [
{
"pr": "11630",
"title": "Release 0.68.2",
"userLogin": "sampaiodiego",
"contributors": [
"c0dzilla",
"sampaiodiego"
]
},
{
"pr": "11544",
"title": "[FIX] Incorrect migration version in v130.js",
Expand All @@ -17697,6 +17706,17 @@
"node_version": "8.11.3",
"npm_version": "5.6.0",
"pull_requests": [
{
"pr": "11650",
"title": "Release 0.68.3",
"userLogin": "sampaiodiego",
"contributors": [
"Hudell",
"sampaiodiego",
"rndmh3ro",
"MarcosSpessatto"
]
},
{
"pr": "11639",
"title": "[FIX] Missing chat history for users without permission `preview-c-room`",
Expand Down Expand Up @@ -17750,6 +17770,40 @@
]
}
]
},
"0.68.4": {
"node_version": "8.11.3",
"npm_version": "5.6.0",
"pull_requests": [
{
"pr": "11719",
"title": "[FIX] Default server language not being applied",
"userLogin": "sampaiodiego",
"milestone": "0.68.4",
"contributors": [
"sampaiodiego"
]
},
{
"pr": "11708",
"title": "[FIX] Broken logo on setup wizard",
"userLogin": "sampaiodiego",
"milestone": "0.68.4",
"contributors": [
"sampaiodiego"
]
},
{
"pr": "11646",
"title": "[FIX] Regression in prune by user, and update lastMessage",
"userLogin": "vynmera",
"milestone": "0.68.4",
"contributors": [
"vynmera",
"ggazzo"
]
}
]
}
}
}
4 changes: 2 additions & 2 deletions .sandstorm/sandstorm-pkgdef.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const pkgdef :Spk.PackageDefinition = (

appTitle = (defaultText = "Rocket.Chat"),

appVersion = 92, # Increment this for every release.
appVersion = 93, # Increment this for every release.

appMarketingVersion = (defaultText = "0.68.3"),
appMarketingVersion = (defaultText = "0.68.4"),
# Human-readable representation of appVersion. Should match the way you
# identify versions of your app in documentation and marketing.

Expand Down
2 changes: 1 addition & 1 deletion .travis/snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ elif [[ $TRAVIS_TAG ]]; then
RC_VERSION=$TRAVIS_TAG
else
CHANNEL=edge
RC_VERSION=0.68.3
RC_VERSION=0.68.4
fi

echo "Preparing to trigger a snap release for $CHANNEL channel"
Expand Down
40 changes: 38 additions & 2 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@

# 0.68.4
`2018-08-10 · 3 🐛 · 3 👩‍💻👨‍💻`

### Engine versions
- Node: `8.11.3`
- NPM: `5.6.0`

### 🐛 Bug fixes

- Default server language not being applied ([#11719](https://github.com/RocketChat/Rocket.Chat/pull/11719))
- Broken logo on setup wizard ([#11708](https://github.com/RocketChat/Rocket.Chat/pull/11708))
- Regression in prune by user, and update lastMessage ([#11646](https://github.com/RocketChat/Rocket.Chat/pull/11646) by [@vynmera](https://github.com/vynmera))

### 👩‍💻👨‍💻 Contributors 😍

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

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

- [@ggazzo](https://github.com/ggazzo)
- [@sampaiodiego](https://github.com/sampaiodiego)

# 0.68.3
`2018-08-01 · 5 🐛 · 4 👩‍💻👨‍💻`
`2018-08-01 · 5 🐛 · 1 🔍 · 4 👩‍💻👨‍💻`

### Engine versions
- Node: `8.11.3`
Expand All @@ -14,6 +36,13 @@
- Prune translation on room info panel ([#11635](https://github.com/RocketChat/Rocket.Chat/pull/11635))
- SAML login not working when user has multiple emails ([#11642](https://github.com/RocketChat/Rocket.Chat/pull/11642))

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

- Release 0.68.3 ([#11650](https://github.com/RocketChat/Rocket.Chat/pull/11650) by [@rndmh3ro](https://github.com/rndmh3ro))

</details>

### 👩‍💻👨‍💻 Contributors 😍

- [@rndmh3ro](https://github.com/rndmh3ro)
Expand All @@ -25,7 +54,7 @@
- [@sampaiodiego](https://github.com/sampaiodiego)

# 0.68.2
`2018-07-31 · 1 🐛 · 2 👩‍💻👨‍💻`
`2018-07-31 · 1 🐛 · 1 🔍 · 2 👩‍💻👨‍💻`

### Engine versions
- Node: `8.11.3`
Expand All @@ -35,6 +64,13 @@

- Incorrect migration version in v130.js ([#11544](https://github.com/RocketChat/Rocket.Chat/pull/11544) by [@c0dzilla](https://github.com/c0dzilla))

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

- Release 0.68.2 ([#11630](https://github.com/RocketChat/Rocket.Chat/pull/11630) by [@c0dzilla](https://github.com/c0dzilla))

</details>

### 👩‍💻👨‍💻 Contributors 😍

- [@c0dzilla](https://github.com/c0dzilla)
Expand Down
28 changes: 12 additions & 16 deletions client/startup/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,29 +56,25 @@ Meteor.startup(() => {
loadMomentLocale(language).then(locale => moment.locale(locale), error => console.error(error));
};

const setLanguage = language => {
currentLanguage.set(filterLanguage(language));
localStorage.setItem('userLanguage', currentLanguage.get());
const setLanguage = (language) => {
const lang = filterLanguage(language);
currentLanguage.set(lang);
localStorage.setItem('userLanguage', lang);
};

window.setLanguage = setLanguage;

window.defaultUserLanguage = () => RocketChat.settings.get('Language') || getBrowserLanguage() || 'en';
const defaultUserLanguage = () => RocketChat.settings.get('Language') || getBrowserLanguage() || 'en';
window.defaultUserLanguage = defaultUserLanguage;

Tracker.autorun(() => {
const user = RocketChat.models.Users.findOne(Meteor.userId(), { fields: { username: 1 }});
const userLanguage = user && user.language;

const defaultLanguage = userLanguage || RocketChat.settings.get('Language') || 'en';
const user = RocketChat.models.Users.findOne(Meteor.userId(), { fields: { language: 1 }});

if (!currentLanguage.get()) {
setLanguage(defaultLanguage);
}
setLanguage((user && user.language) || defaultUserLanguage());
});

if (userLanguage && userLanguage !== currentLanguage.get()) {
setLanguage(userLanguage);
Tracker.autorun(() => {
if (currentLanguage.get()) {
applyLanguage(currentLanguage.get());
}

applyLanguage(currentLanguage.get());
});
});
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": "0.68.3",
"version": "0.68.4",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-lib/rocketchat.info
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.68.3"
"version": "0.68.4"
}
8 changes: 2 additions & 6 deletions packages/rocketchat-lib/server/functions/cleanRoomHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@ RocketChat.cleanRoomHistory = function({ rid, latest = new Date(), oldest = new
return fileCount;
}

let count = 0;
if (limit) {
count = RocketChat.models.Messages.removeByIdPinnedTimestampLimitAndUsers(rid, excludePinned, ts, limit, fromUsers);
} else {
count = RocketChat.models.Messages.removeByIdPinnedTimestampAndUsers(rid, excludePinned, ts, fromUsers);
}
const count = limit ? RocketChat.models.Messages.removeByIdPinnedTimestampLimitAndUsers(rid, excludePinned, ts, limit, fromUsers) : RocketChat.models.Messages.removeByIdPinnedTimestampAndUsers(rid, excludePinned, ts, fromUsers);

if (count) {
RocketChat.models.Rooms.resetLastMessageById(rid);
RocketChat.Notifications.notifyRoom(rid, 'deleteMessageBulk', {
rid,
excludePinned,
Expand Down
3 changes: 1 addition & 2 deletions packages/rocketchat-lib/server/functions/deleteMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ RocketChat.deleteMessage = function(message, user) {
if (RocketChat.settings.get('Store_Last_Message')) {
const room = RocketChat.models.Rooms.findOneById(message.rid, { fields: { lastMessage: 1 } });
if (!room.lastMessage || room.lastMessage._id === message._id) {
const lastMessage = RocketChat.models.Messages.getLastVisibleMessageSentWithNoTypeByRoomId(message.rid, message._id);
RocketChat.models.Rooms.setLastMessageById(message.rid, lastMessage);
RocketChat.models.Rooms.resetLastMessageById(message.rid);
}
}

Expand Down
17 changes: 17 additions & 0 deletions packages/rocketchat-lib/server/models/Rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,23 @@ class ModelRooms extends RocketChat.models._Base {
return this.update(query, update);
}

resetLastMessageById(_id) {
const query = { _id };
const lastMessage = RocketChat.models.Messages.getLastVisibleMessageSentWithNoTypeByRoomId(_id);

const update = lastMessage ? {
$set: {
lastMessage
}
} : {
$unset: {
lastMessage: 1
}
};

return this.update(query, update);
}

replaceUsername(previousUsername, username) {
const query = {usernames: previousUsername};

Expand Down
Loading