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 1.3.2 #15176

Merged
merged 6 commits into from
Aug 14, 2019
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 1.3.1
ENV RC_VERSION 1.3.2

MAINTAINER buildmaster@rocket.chat

Expand Down
60 changes: 60 additions & 0 deletions .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -33563,6 +33563,66 @@
]
}
]
},
"1.3.2": {
"node_version": "8.11.4",
"npm_version": "6.4.1",
"mongo_versions": [
"3.2",
"3.4",
"3.6",
"4.0"
],
"pull_requests": [
{
"pr": "15172",
"title": "[FIX] Attachment download button behavior",
"userLogin": "tassoevan",
"milestone": "1.3.2",
"contributors": [
"tassoevan",
"sampaiodiego"
]
},
{
"pr": "15175",
"title": "[FIX] Messages search scroll",
"userLogin": "ggazzo",
"milestone": "1.3.2",
"contributors": [
"ggazzo"
]
},
{
"pr": "15157",
"title": "[FIX] IE11 - callback createTreeWalker doesnt accept acceptNode",
"userLogin": "ggazzo",
"milestone": "1.3.2",
"contributors": [
"ggazzo",
"tassoevan"
]
},
{
"pr": "15173",
"title": "Update latest Livechat widget version to 1.1.4",
"userLogin": "renatobecker",
"milestone": "1.3.2",
"contributors": [
"renatobecker"
]
},
{
"pr": "15154",
"title": "Update latest Livechat widget version(1.1.3)",
"userLogin": "renatobecker",
"milestone": "1.3.2",
"contributors": [
"renatobecker",
"web-flow"
]
}
]
}
}
}
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=1.3.1
RC_VERSION=1.3.2
fi

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

# 1.3.1
`2019-08-08 · 2 🐛 · 2 👩‍💻👨‍💻`
# 1.3.2
`2019-08-13 · 3 🐛 · 2 🔍 · 4 👩‍💻👨‍💻`

### Engine versions
- Node: `8.11.4`
Expand All @@ -9,21 +9,42 @@

### 🐛 Bug fixes

- Custom emoji table scroll ([#15119](https://github.com/RocketChat/Rocket.Chat/pull/15119))
- Direct Message names not visible on Admin panel ([#15114](https://github.com/RocketChat/Rocket.Chat/pull/15114))
- Attachment download button behavior ([#15172](https://github.com/RocketChat/Rocket.Chat/pull/15172))
- Messages search scroll ([#15175](https://github.com/RocketChat/Rocket.Chat/pull/15175))
- IE11 - callback createTreeWalker doesnt accept acceptNode ([#15157](https://github.com/RocketChat/Rocket.Chat/pull/15157))

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

- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141))
- Update latest Livechat widget version to 1.1.4 ([#15173](https://github.com/RocketChat/Rocket.Chat/pull/15173))
- Update latest Livechat widget version(1.1.3) ([#15154](https://github.com/RocketChat/Rocket.Chat/pull/15154))

</details>

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

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

# 1.3.1
`2019-08-08 · 2 🐛 · 2 👩‍💻👨‍💻`

### Engine versions
- Node: `8.11.4`
- NPM: `6.4.1`
- MongoDB: `3.2, 3.4, 3.6, 4.0`

### 🐛 Bug fixes

- Custom emoji table scroll ([#15119](https://github.com/RocketChat/Rocket.Chat/pull/15119))
- Direct Message names not visible on Admin panel ([#15114](https://github.com/RocketChat/Rocket.Chat/pull/15114))

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

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

# 1.3.0
`2019-08-02 · 9 🎉 · 6 🚀 · 31 🐛 · 31 🔍 · 29 👩‍💻👨‍💻`
Expand Down Expand Up @@ -5369,4 +5390,4 @@
- [@marceloschmidt](https://github.com/marceloschmidt)
- [@mrsimpson](https://github.com/mrsimpson)
- [@rodrigok](https://github.com/rodrigok)
- [@sampaiodiego](https://github.com/sampaiodiego)
- [@sampaiodiego](https://github.com/sampaiodiego)
62 changes: 33 additions & 29 deletions app/emoji/client/emojiParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';

import { getUserPreference } from '../../utils';
import { isIE11 } from '../../ui-utils/client/lib/isIE11';
import { callbacks } from '../../callbacks';
import { emoji } from '../lib/rocketchat';

Expand Down Expand Up @@ -32,41 +33,44 @@ Tracker.autorun(() => {

const emojis = Array.from(checkEmojiOnly.querySelectorAll('.emoji:not(:empty), .emojione:not(:empty)'));

const walker = document.createTreeWalker(
checkEmojiOnly,
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT,
{
acceptNode: (node) => {
if (node.nodeType === Node.ELEMENT_NODE && (
node.classList.contains('emojione')
|| node.classList.contains('emoji')
)) {
return NodeFilter.FILTER_REJECT;
}
return NodeFilter.FILTER_ACCEPT;
},
},
);

let hasText = false;

while (walker.nextNode()) {
if (walker.currentNode.nodeType === Node.TEXT_NODE && walker.currentNode.nodeValue.trim() !== '') {
hasText = true;
break;
if (!isIE11()) {
const filter = (node) => {
if (node.nodeType === Node.ELEMENT_NODE && (
node.classList.contains('emojione')
|| node.classList.contains('emoji')
)) {
return NodeFilter.FILTER_REJECT;
}
return NodeFilter.FILTER_ACCEPT;
};

const walker = document.createTreeWalker(
checkEmojiOnly,
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT,
filter
);


while (walker.nextNode()) {
if (walker.currentNode.nodeType === Node.TEXT_NODE && walker.currentNode.nodeValue.trim() !== '') {
hasText = true;
break;
}
}
}

const emojiOnly = emojis.length && !hasText;

if (emojiOnly) {
for (let i = 0, len = emojis.length; i < len; i++) {
const { classList } = emojis[i];
classList.add('big');
const emojiOnly = emojis.length && !hasText;

if (emojiOnly) {
for (let i = 0, len = emojis.length; i < len; i++) {
const { classList } = emojis[i];
classList.add('big');
}
html = checkEmojiOnly.innerHTML;
}
html = checkEmojiOnly.innerHTML;
}


// apostrophe (') back to &#39;
html = html.replace(/\'/g, '&#39;');

Expand Down
28 changes: 13 additions & 15 deletions app/file-upload/server/config/AmazonS3.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,21 @@ import { FileUploadClass, FileUpload } from '../lib/FileUpload';
import '../../ufs/AmazonS3/server.js';

const get = function(file, req, res) {
const fileUrl = this.store.getRedirectURL(file);
const forceDownload = typeof req.query.download !== 'undefined';
const fileUrl = this.store.getRedirectURL(file, forceDownload);

if (fileUrl) {
const storeType = file.store.split(':').pop();
if (settings.get(`FileUpload_S3_Proxy_${ storeType }`)) {
const request = /^https:/.test(fileUrl) ? https : http;
request.get(fileUrl, (fileRes) => fileRes.pipe(res));
} else {
res.removeHeader('Content-Length');
res.removeHeader('Cache-Control');
res.setHeader('Location', fileUrl);
res.writeHead(302);
res.end();
}
} else {
res.end();
if (!fileUrl) {
return res.end();
}

const storeType = file.store.split(':').pop();
if (settings.get(`FileUpload_S3_Proxy_${ storeType }`)) {
const request = /^https:/.test(fileUrl) ? https : http;

return FileUpload.proxyFile(file.name, fileUrl, forceDownload, request, req, res);
}

return FileUpload.redirectToFile(fileUrl, req, res);
};

const copy = function(file, out) {
Expand Down
33 changes: 16 additions & 17 deletions app/file-upload/server/config/GoogleStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,30 @@ import { settings } from '../../../settings';
import '../../ufs/GoogleStorage/server.js';

const get = function(file, req, res) {
this.store.getRedirectURL(file, (err, fileUrl) => {
const forceDownload = typeof req.query.download !== 'undefined';

this.store.getRedirectURL(file, forceDownload, (err, fileUrl) => {
if (err) {
console.error(err);
return console.error(err);
}

if (fileUrl) {
const storeType = file.store.split(':').pop();
if (settings.get(`FileUpload_GoogleStorage_Proxy_${ storeType }`)) {
const request = /^https:/.test(fileUrl) ? https : http;
request.get(fileUrl, (fileRes) => fileRes.pipe(res));
} else {
res.removeHeader('Content-Length');
res.removeHeader('Cache-Control');
res.setHeader('Location', fileUrl);
res.writeHead(302);
res.end();
}
} else {
res.end();
if (!fileUrl) {
return res.end();
}

const storeType = file.store.split(':').pop();
if (settings.get(`FileUpload_GoogleStorage_Proxy_${ storeType }`)) {
const request = /^https:/.test(fileUrl) ? https : http;

return FileUpload.proxyFile(file.name, fileUrl, forceDownload, request, req, res);
}

return FileUpload.redirectToFile(fileUrl, req, res);
});
};

const copy = function(file, out) {
this.store.getRedirectURL(file, (err, fileUrl) => {
this.store.getRedirectURL(file, false, (err, fileUrl) => {
if (err) {
console.error(err);
}
Expand Down
14 changes: 14 additions & 0 deletions app/file-upload/server/lib/FileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,20 @@ export const FileUpload = {

return false;
},

redirectToFile(fileUrl, req, res) {
res.removeHeader('Content-Length');
res.removeHeader('Cache-Control');
res.setHeader('Location', fileUrl);
res.writeHead(302);
res.end();
},

proxyFile(fileName, fileUrl, forceDownload, request, req, res) {
res.setHeader('Content-Disposition', `${ forceDownload ? 'attachment' : 'inline' }; filename="${ encodeURI(fileName) }"`);

request.get(fileUrl, (fileRes) => fileRes.pipe(res));
},
};

export class FileUploadClass {
Expand Down
4 changes: 2 additions & 2 deletions app/file-upload/ufs/AmazonS3/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ export class AmazonS3Store extends UploadFS.Store {
}
};

this.getRedirectURL = function(file) {
this.getRedirectURL = function(file, forceDownload = false) {
const params = {
Key: this.getPath(file),
Expires: classOptions.URLExpiryTimeSpan,
ResponseContentDisposition: `${ forceDownload ? 'attachment' : 'inline' }; filename="${ encodeURI(file.name) }"`,
};

return s3.getSignedUrl('getObject', params);
Expand Down Expand Up @@ -140,7 +141,6 @@ export class AmazonS3Store extends UploadFS.Store {
Key: this.getPath(file),
Body: writeStream,
ContentType: file.type,
ContentDisposition: `inline; filename="${ encodeURI(file.name) }"`,

}, (error) => {
if (error) {
Expand Down
4 changes: 2 additions & 2 deletions app/file-upload/ufs/GoogleStorage/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export class GoogleStorageStore extends UploadFS.Store {
}
};

this.getRedirectURL = function(file, callback) {
this.getRedirectURL = function(file, forceDownload = false, callback) {
const params = {
action: 'read',
responseDisposition: 'inline',
responseDisposition: forceDownload ? 'attachment' : 'inline',
expires: Date.now() + this.options.URLExpiryTimeSpan * 1000,
};

Expand Down
2 changes: 1 addition & 1 deletion app/markdown/lib/parser/original/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const parseNotEscaped = function(msg, message) {
return token;
};

const schemes = settings.get('Markdown_SupportSchemesForLink').split(',').join('|');
const schemes = (settings.get('Markdown_SupportSchemesForLink') || '').split(',').join('|');

if (settings.get('Markdown_Headers')) {
// Support # Text for h1
Expand Down
2 changes: 1 addition & 1 deletion app/message-attachments/client/messageAttachment.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{{#if title_link}}
<a href="{{getURL title_link}}" target="_blank" rel="noopener noreferrer">{{title}}</a>
{{#if title_link_download}}
<a class="attachment-download-icon rc-tooltip" aria-label="{{_ 'Download'}}" href="{{getURL title_link}}" target="_blank" download="" rel="noopener noreferrer">{{> icon icon="download"}}</a>
<a class="attachment-download-icon rc-tooltip" aria-label="{{_ 'Download'}}" href="{{getURL title_link}}?download" target="_blank" download="{{title}}" rel="noopener noreferrer">{{> icon icon="download"}}</a>
{{/if}}
{{else}}
{{title}}
Expand Down
2 changes: 1 addition & 1 deletion app/search/client/provider/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Template.DefaultSearchResultTemplate.onRendered(function() {
const result = this.data.result.get();
if (result && this.hasMore.get()) {
Tracker.afterFlush(() => {
if (list.scrollHeight <= list.offsetHeight) {
if (list.scrollHeight < list.offsetHeight) {
this.data.payload.limit = (this.data.payload.limit || this.pageSize) + this.pageSize;
this.data.search();
}
Expand Down
Loading