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.65.1 #10947

Merged
merged 6 commits into from
May 30, 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rocketchat/base:8

ENV RC_VERSION 0.65.0
ENV RC_VERSION 0.65.1

MAINTAINER buildmaster@rocket.chat

Expand Down
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.65.0
ENV RC_VERSION 0.65.1

MAINTAINER buildmaster@rocket.chat

Expand Down
48 changes: 48 additions & 0 deletions .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -14697,5 +14697,53 @@
"geekgonecrazy"
]
}
],
"0.65.1": [
{
"pr": "10940",
"title": "[FIX] Livechat not loading",
"userLogin": "sampaiodiego",
"milestone": "0.65.1",
"contributors": [
"sampaiodiego",
"rodrigok"
]
},
{
"pr": "10934",
"title": "[FIX] Application crashing on startup when trying to log errors to `exceptions` channel",
"userLogin": "sampaiodiego",
"milestone": "0.65.1",
"contributors": [
"sampaiodiego"
]
},
{
"pr": "10928",
"title": "[FIX] Incomplete email notification link",
"userLogin": "sampaiodiego",
"milestone": "0.65.1",
"contributors": [
"sampaiodiego"
]
},
{
"pr": "10904",
"title": "[FIX] Image lazy load was breaking attachments",
"userLogin": "ggazzo",
"milestone": "0.65.1",
"contributors": [
"ggazzo"
]
},
{
"pr": "10851",
"title": "[FIX] Leave room wasn't working as expected",
"userLogin": "ggazzo",
"milestone": "0.65.1",
"contributors": [
"ggazzo"
]
}
]
}
6 changes: 3 additions & 3 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ accounts-twitter@1.4.1
aldeed:simple-schema@1.5.4
allow-deny@1.1.0
autoupdate@1.4.0
babel-compiler@7.0.8
babel-compiler@7.0.9
babel-runtime@1.2.2
base64@1.0.11
binary-heap@1.0.10
Expand All @@ -35,7 +35,7 @@ deps@1.0.12
diff-sequence@1.1.0
dispatch:run-as-user@1.1.1
dynamic-import@0.3.0
ecmascript@0.10.8
ecmascript@0.10.9
ecmascript-runtime@0.5.0
ecmascript-runtime-client@0.6.2
ecmascript-runtime-server@0.5.0
Expand Down Expand Up @@ -91,7 +91,7 @@ mizzao:autocomplete@0.5.1
mizzao:timesync@0.3.4
mobile-experience@1.0.5
mobile-status-bar@1.0.14
modules@0.11.6
modules@0.11.8
modules-runtime@0.9.2
mongo@1.4.7
mongo-dev-server@1.1.0
Expand Down
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 = 70, # Increment this for every release.
appVersion = 71, # Increment this for every release.

appMarketingVersion = (defaultText = "0.65.0"),
appMarketingVersion = (defaultText = "0.65.1"),
# 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.65.0
RC_VERSION=0.65.1
fi

echo "Preparing to trigger a snap release for $CHANNEL channel"
Expand Down
13 changes: 12 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@

# 0.65.1
`2018-05-30 · 5 🐛`

### 🐛 Bug fixes

- Livechat not loading ([#10940](https://github.com/RocketChat/Rocket.Chat/pull/10940))
- Application crashing on startup when trying to log errors to `exceptions` channel ([#10934](https://github.com/RocketChat/Rocket.Chat/pull/10934))
- Incomplete email notification link ([#10928](https://github.com/RocketChat/Rocket.Chat/pull/10928))
- Image lazy load was breaking attachments ([#10904](https://github.com/RocketChat/Rocket.Chat/pull/10904))
- Leave room wasn't working as expected ([#10851](https://github.com/RocketChat/Rocket.Chat/pull/10851))

# 0.65.0
`2018-05-27 · 17 🎉 · 24 🐛 · 41 🔍 · 17 👩‍💻👨‍💻`
`2018-05-28 · 17 🎉 · 24 🐛 · 41 🔍 · 17 👩‍💻👨‍💻`

### 🎉 New features

Expand Down
18 changes: 0 additions & 18 deletions client/methods/leaveRoom.js

This file was deleted.

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": "0.65.0",
"version": "0.65.1",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
Expand Down Expand Up @@ -110,7 +110,7 @@
"supertest": "^3.0.0"
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.46",
"@babel/runtime": "^7.0.0-beta.48",
"@google-cloud/language": "^1.2.0",
"@google-cloud/storage": "^1.6.0",
"@google-cloud/vision": "^0.19.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@ class ErrorHandler {
this.rid = null;
this.lastError = null;

this.registerHandlers();

RocketChat.settings.get('Log_Exceptions_to_Channel', (key, value) => {
if (value.trim()) {
this.reporting = true;
this.rid = this.getRoomId(value);
} else {
this.reporting = false;
this.rid = '';
}
Meteor.startup(() => {
this.registerHandlers();

RocketChat.settings.get('Log_Exceptions_to_Channel', (key, value) => {
this.rid = null;
const roomName = value.trim();
if (roomName) {
this.rid = this.getRoomId(roomName);
}

if (this.rid) {
this.reporting = true;
} else {
this.reporting = false;
}
});
});
}

Expand All @@ -39,24 +45,24 @@ class ErrorHandler {
getRoomId(roomName) {
roomName = roomName.replace('#');
const room = RocketChat.models.Rooms.findOneByName(roomName, { fields: { _id: 1, t: 1 } });
if (room && (room.t === 'c' || room.t === 'p')) {
return room._id;
} else {
this.reporting = false;
if (!room || (room.t !== 'c' && room.t !== 'p')) {
return;
}
return room._id;
}

trackError(message, stack) {
if (this.reporting && this.rid && this.lastError !== message) {
this.lastError = message;
const user = RocketChat.models.Users.findOneById('rocket.cat');

if (stack) {
message = `${ message }\n\`\`\`\n${ stack }\n\`\`\``;
}
if (!this.reporting || !this.rid || this.lastError === message) {
return;
}
this.lastError = message;
const user = RocketChat.models.Users.findOneById('rocket.cat');

RocketChat.sendMessage(user, { msg: message }, { _id: this.rid });
if (stack) {
message = `${ message }\n\`\`\`\n${ stack }\n\`\`\``;
}

RocketChat.sendMessage(user, { msg: message }, { _id: this.rid });
}
}

Expand Down
28 changes: 17 additions & 11 deletions packages/rocketchat-lazy-load/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,29 @@ export const fixCordova = function(url) {
}
};

const loadImage = instance => {
const getEl = (el, instance) => (instance && instance.firstNode) || el;

const loadImage = (el, instance) => {
const element = getEl(el, instance);
const img = new Image();
const src = instance.firstNode.getAttribute('data-src');
instance.firstNode.className = instance.firstNode.className.replace('lazy-img', '');
const src = element.getAttribute('data-src');
img.onload = function() {
instance.loaded.set(true);
instance.firstNode.removeAttribute('data-src');
if (instance) {
instance.loaded.set(true);
} else {
element.className = element.className.replace('lazy-img', '');
element.src = src;
}
element.removeAttribute('data-src');
};
img.src = fixCordova(src);
};

const isVisible = (instance) => {
const isVisible = (el, instance) => {
requestAnimationFrame(() => {
const rect = instance.firstNode.getBoundingClientRect();
const rect = getEl(el, instance).getBoundingClientRect();
if (rect.top >= -100 && rect.left >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight)) {
return loadImage(instance);
return loadImage(el, instance);
}
});

Expand All @@ -50,10 +56,10 @@ window.addEventListener('resize', window.lazyloadtick);

export const lazyloadtick = _.debounce(() => {
[...document.querySelectorAll('.lazy-img[data-src]')].forEach(el =>
isVisible(Blaze.getView(el)._templateInstance)
isVisible(el, Blaze.getView(el)._templateInstance)
);
}, 500);
}, 300);

window.lazyloadtick = lazyloadtick;

export const addImage = instance => isVisible(instance);
export const addImage = instance => isVisible(instance.firstNode, instance);
4 changes: 4 additions & 0 deletions packages/rocketchat-lazy-load/client/lazyloadImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import './lazyloadImage.html';
import { addImage, fixCordova } from './';

Template.lazyloadImage.helpers({
class() {
const loaded = Template.instance().loaded.get();
return `${ this.class } ${ loaded ? '' : 'lazy-img' }`;
},
lazy() {
const { preview, placeholder, src } = this;
if (Template.instance().loaded.get() ||(!preview && !placeholder)) {
Expand Down
Loading