Skip to content

Commit

Permalink
Merge pull request #14339 from RocketChat/release-1.0.2
Browse files Browse the repository at this point in the history
Release 1.0.2
  • Loading branch information
rodrigok committed Apr 30, 2019
2 parents 4a3e631 + 5cf93be commit abf67ce
Show file tree
Hide file tree
Showing 30 changed files with 499 additions and 196 deletions.
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.0.1
ENV RC_VERSION 1.0.2

MAINTAINER buildmaster@rocket.chat

Expand Down
155 changes: 155 additions & 0 deletions .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -29969,6 +29969,161 @@
]
}
]
},
"1.0.2": {
"node_version": "8.11.4",
"npm_version": "6.4.1",
"mongo_versions": [
"3.2",
"3.4",
"3.6",
"4.0"
],
"pull_requests": [
{
"pr": "14338",
"title": "[FIX] Unread line and new day separator were not aligned ",
"userLogin": "ggazzo",
"milestone": "1.0.2",
"contributors": [
"ggazzo",
"tassoevan",
"web-flow"
]
},
{
"pr": "14336",
"title": "[FIX] Audio notification for messages on DM",
"userLogin": "sampaiodiego",
"milestone": "1.0.2",
"contributors": [
"sampaiodiego"
]
},
{
"pr": "14334",
"title": "[IMPROVE] i18n of threads and discussion buttons",
"userLogin": "sampaiodiego",
"milestone": "1.0.2",
"contributors": [
"sampaiodiego"
]
},
{
"pr": "14330",
"title": "[FIX] Duplicate thread message after editing",
"userLogin": "ggazzo",
"milestone": "1.0.2",
"contributors": [
"ggazzo"
]
},
{
"pr": "14328",
"title": "[FIX] New day separator rendered over thread reply",
"userLogin": "rodrigok",
"milestone": "1.0.2",
"contributors": [
"rodrigok"
]
},
{
"pr": "14320",
"title": "[IMPROVE] Better error message when not able to get MongoDB Version",
"userLogin": "rodrigok",
"milestone": "1.0.2",
"contributors": [
"rodrigok",
"d-gubert",
"web-flow"
]
},
{
"pr": "14318",
"title": "Add cross-browser select arrow positioning",
"userLogin": "tassoevan",
"milestone": "1.0.2",
"contributors": [
"tassoevan"
]
},
{
"pr": "14182",
"title": "i18n: Update German strings",
"userLogin": "AnBo83",
"milestone": "1.0.2",
"contributors": [
"AnBo83",
"web-flow"
]
},
{
"pr": "14011",
"title": "[FIX] Missing i18n for some new Permissions",
"userLogin": "lolimay",
"milestone": "1.0.2",
"contributors": [
"lolimay",
"tassoevan",
"web-flow"
]
},
{
"pr": "14316",
"title": "[FIX] View Logs admin page was broken and not rendering color logs",
"userLogin": "tassoevan",
"milestone": "1.0.2",
"contributors": [
"tassoevan",
"web-flow"
]
},
{
"pr": "14301",
"title": "[Regression] Anonymous user fix",
"userLogin": "knrt10",
"milestone": "1.0.2",
"contributors": [
"knrt10"
]
},
{
"pr": "14299",
"title": "Coerces the MongoDB version string",
"userLogin": "thaiphv",
"milestone": "1.0.2",
"contributors": [
"thaiphv"
]
},
{
"pr": "14313",
"title": "[FIX] show roles on message",
"userLogin": "ggazzo",
"milestone": "1.0.2",
"contributors": [
"ggazzo"
]
},
{
"pr": "14075",
"title": "[Fix] group name appears instead of the room id",
"userLogin": "mohamedar97",
"milestone": "1.0.2",
"contributors": [
"mohamedar97"
]
},
{
"pr": "14311",
"title": "[FIX] Remove reference to inexistent field when deleting message in thread",
"userLogin": "tassoevan",
"milestone": "1.0.2",
"contributors": [
"tassoevan"
]
}
]
}
}
}
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.0.1
RC_VERSION=1.0.2
fi

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

# 1.0.2
`2019-04-30 · 2 🚀 · 8 🐛 · 5 🔍 · 10 👩‍💻👨‍💻`

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

### 🚀 Improvements

- i18n of threads and discussion buttons ([#14334](https://github.com/RocketChat/Rocket.Chat/pull/14334))
- Better error message when not able to get MongoDB Version ([#14320](https://github.com/RocketChat/Rocket.Chat/pull/14320))

### 🐛 Bug fixes

- Unread line and new day separator were not aligned ([#14338](https://github.com/RocketChat/Rocket.Chat/pull/14338))
- Audio notification for messages on DM ([#14336](https://github.com/RocketChat/Rocket.Chat/pull/14336))
- Duplicate thread message after editing ([#14330](https://github.com/RocketChat/Rocket.Chat/pull/14330))
- New day separator rendered over thread reply ([#14328](https://github.com/RocketChat/Rocket.Chat/pull/14328))
- Missing i18n for some new Permissions ([#14011](https://github.com/RocketChat/Rocket.Chat/pull/14011) by [@lolimay](https://github.com/lolimay))
- View Logs admin page was broken and not rendering color logs ([#14316](https://github.com/RocketChat/Rocket.Chat/pull/14316))
- show roles on message ([#14313](https://github.com/RocketChat/Rocket.Chat/pull/14313))
- Remove reference to inexistent field when deleting message in thread ([#14311](https://github.com/RocketChat/Rocket.Chat/pull/14311))

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

- Add cross-browser select arrow positioning ([#14318](https://github.com/RocketChat/Rocket.Chat/pull/14318))
- i18n: Update German strings ([#14182](https://github.com/RocketChat/Rocket.Chat/pull/14182) by [@AnBo83](https://github.com/AnBo83))
- [Regression] Anonymous user fix ([#14301](https://github.com/RocketChat/Rocket.Chat/pull/14301) by [@knrt10](https://github.com/knrt10))
- Coerces the MongoDB version string ([#14299](https://github.com/RocketChat/Rocket.Chat/pull/14299) by [@thaiphv](https://github.com/thaiphv))
- [Fix] group name appears instead of the room id ([#14075](https://github.com/RocketChat/Rocket.Chat/pull/14075) by [@mohamedar97](https://github.com/mohamedar97))

</details>

### 👩‍💻👨‍💻 Contributors 😍

- [@AnBo83](https://github.com/AnBo83)
- [@knrt10](https://github.com/knrt10)
- [@lolimay](https://github.com/lolimay)
- [@mohamedar97](https://github.com/mohamedar97)
- [@thaiphv](https://github.com/thaiphv)

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

- [@d-gubert](https://github.com/d-gubert)
- [@ggazzo](https://github.com/ggazzo)
- [@rodrigok](https://github.com/rodrigok)
- [@sampaiodiego](https://github.com/sampaiodiego)
- [@tassoevan](https://github.com/tassoevan)

# 1.0.1
`2019-04-28 · 7 🐛 · 4 👩‍💻👨‍💻`

Expand Down
14 changes: 7 additions & 7 deletions app/lib/server/functions/getAvatarSuggestionForUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,49 @@ export function getAvatarSuggestionForUser(user) {

const avatars = [];

if (user.services.facebook && user.services.facebook.id && settings.get('Accounts_OAuth_Facebook')) {
if (user.services && user.services.facebook && user.services.facebook.id && settings.get('Accounts_OAuth_Facebook')) {
avatars.push({
service: 'facebook',
url: `https://graph.facebook.com/${ user.services.facebook.id }/picture?type=large`,
});
}

if (user.services.google && user.services.google.picture && user.services.google.picture !== 'https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg' && settings.get('Accounts_OAuth_Google')) {
if (user.services && user.services.google && user.services.google.picture && user.services.google.picture !== 'https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg' && settings.get('Accounts_OAuth_Google')) {
avatars.push({
service: 'google',
url: user.services.google.picture,
});
}

if (user.services.github && user.services.github.username && settings.get('Accounts_OAuth_Github')) {
if (user.services && user.services.github && user.services.github.username && settings.get('Accounts_OAuth_Github')) {
avatars.push({
service: 'github',
url: `https://avatars.githubusercontent.com/${ user.services.github.username }?s=200`,
});
}

if (user.services.linkedin && user.services.linkedin.pictureUrl && settings.get('Accounts_OAuth_Linkedin')) {
if (user.services && user.services.linkedin && user.services.linkedin.pictureUrl && settings.get('Accounts_OAuth_Linkedin')) {
avatars.push({
service: 'linkedin',
url: user.services.linkedin.pictureUrl,
});
}

if (user.services.twitter && user.services.twitter.profile_image_url_https && settings.get('Accounts_OAuth_Twitter')) {
if (user.services && user.services.twitter && user.services.twitter.profile_image_url_https && settings.get('Accounts_OAuth_Twitter')) {
avatars.push({
service: 'twitter',
url: user.services.twitter.profile_image_url_https.replace(/_normal|_bigger/, ''),
});
}

if (user.services.gitlab && user.services.gitlab.avatar_url && settings.get('Accounts_OAuth_Gitlab')) {
if (user.services && user.services.gitlab && user.services.gitlab.avatar_url && settings.get('Accounts_OAuth_Gitlab')) {
avatars.push({
service: 'gitlab',
url: user.services.gitlab.avatar_url,
});
}

if (user.services.blockstack && user.services.blockstack.image && settings.get('Blockstack_Enable')) {
if (user.services && user.services.blockstack && user.services.blockstack.image && settings.get('Blockstack_Enable')) {
avatars.push({
service: 'blockstack',
url: user.services.blockstack.image,
Expand Down
3 changes: 2 additions & 1 deletion app/lib/server/functions/notifications/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export function shouldNotifyAudio({
isHighlighted,
hasMentionToUser,
hasReplyToThread,
roomType,
}) {
if (disableAllMessageNotifications && audioNotifications == null && !hasReplyToThread) {
return false;
Expand All @@ -25,7 +26,7 @@ export function shouldNotifyAudio({
return true;
}

return (!disableAllMessageNotifications && (hasMentionToAll || hasMentionToHere)) || isHighlighted || audioNotifications === 'all' || hasMentionToUser || hasReplyToThread;
return roomType === 'd' || (!disableAllMessageNotifications && (hasMentionToAll || hasMentionToHere)) || isHighlighted || audioNotifications === 'all' || hasMentionToUser || hasReplyToThread;
}

export function notifyAudioUser(userId, message, room) {
Expand Down
63 changes: 28 additions & 35 deletions app/logger/client/ansispan.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,4 @@
export const ansispan = function(str) {
str = str.replace(/>/g, '&gt;');
str = str.replace(/</g, '&lt;');

Object.keys(ansispan.foregroundColors).forEach(function(ansi) {
const span = `<span style="color: ${ ansispan.foregroundColors[ansi] }">`;

//
// `\033[Xm` == `\033[0;Xm` sets foreground color to `X`.
//

str = str.replace(
new RegExp(`\0o33\\[${ ansi }m`, 'g'),
span
).replace(
new RegExp(`\0o33\\[0;${ ansi }m`, 'g'),
span
);
});
//
// `\033[1m` enables bold font, `\033[22m` disables it
//
str = str.replace(/\033\[1m/g, '<b>').replace(/\033\[22m/g, '</b>');

//
// `\033[3m` enables italics font, `\033[23m` disables it
//
str = str.replace(/\033\[3m/g, '<i>').replace(/\033\[23m/g, '</i>');

str = str.replace(/\033\[m/g, '</span>');
str = str.replace(/\033\[0m/g, '</span>');
return str.replace(/\033\[39m/g, '</span>');
};

ansispan.foregroundColors = {
const foregroundColors = {
30: 'gray',
31: 'red',
32: 'lime',
Expand All @@ -42,3 +8,30 @@ ansispan.foregroundColors = {
36: 'cyan',
37: 'white',
};

export const ansispan = (str: string) => {
str = (
str
.replace(/\s/g, '&nbsp;')
.replace(/(\\n|\n)/g, '<br>')
.replace(/>/g, '&gt;')
.replace(/</g, '&lt;')
.replace(/(.\d{8}-\d\d:\d\d:\d\d\.\d\d\d\(?.{0,2}\)?)/, '<span class="terminal-time">$1</span>')
.replace(/\033\[1m/g, '<strong>')
.replace(/\033\[22m/g, '</strong>')
.replace(/\033\[3m/g, '<em>')
.replace(/\033\[23m/g, '</em>')
.replace(/\033\[m/g, '</span>')
.replace(/\033\[0m/g, '</span>')
.replace(/\033\[39m/g, '</span>')
);

return Object.entries(foregroundColors).reduce((str, [ansiCode, color]) => {
const span = `<span style="color: ${ color }">`;
return (
str
.replace(new RegExp(`\\033\\[${ ansiCode }m`, 'g'), span)
.replace(new RegExp(`\\033\\[0;${ ansiCode }m`, 'g'), span)
);
}, str);
};
1 change: 0 additions & 1 deletion app/logger/client/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import './logger';
import './viewLogs';
import './views/viewLogs.html';
import './views/viewLogs';
Loading

0 comments on commit abf67ce

Please sign in to comment.