Skip to content

Commit

Permalink
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
Browse files Browse the repository at this point in the history
…into feat/new-threads

* 'feat/new-threads' of github.com:RocketChat/Rocket.Chat:
  Regression: RegExp callbacks of settings were not being called (#17552)
  Fix notifications and rooms list updates
  Fix marking closed threads as read
  Meteor update to version 1.10.2 (#17533)
  Fix default offline channel name when saving departments. (#17553)
  [NEW] Screen Lock settings - mobile client (#17523)
  • Loading branch information
ggazzo committed May 8, 2020
2 parents add04cc + d24a451 commit 3ee42b6
Show file tree
Hide file tree
Showing 24 changed files with 533 additions and 124 deletions.
38 changes: 17 additions & 21 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,35 @@
rocketchat:mongo-config

accounts-facebook@1.3.2
accounts-github@1.4.2
accounts-github@1.4.3
accounts-google@1.3.3
accounts-meteor-developer@1.4.2
accounts-password@1.5.2
accounts-password@1.6.0
accounts-twitter@1.4.2
blaze-html-templates
check@1.3.1
ddp-rate-limiter@1.0.7
ddp-common@1.4.0
dynamic-import@0.5.1
ecmascript@0.14.2
typescript@3.7.5
dynamic-import@0.5.2
ecmascript@0.14.3
typescript@3.7.6
ejson@1.1.1
email@1.2.3
fastclick@1.0.13
http@1.4.2
jquery@1.11.10
logging@1.1.20
meteor-base@1.4.0
mobile-experience@1.0.5
mongo@1.8.0
random@1.1.0
mobile-experience@1.1.0
mongo@1.10.0
random@1.2.0
rate-limit@1.0.9
reactive-dict@1.3.0
reactive-var@1.0.11
reload@1.3.0
service-configuration@1.0.11
session@1.2.0
shell-server@0.4.0
shell-server@0.5.0
spacebars
standard-minifier-js@2.6.0
tracker@1.2.0
Expand All @@ -44,9 +44,6 @@ rocketchat:livechat
rocketchat:streamer
rocketchat:version

konecty:change-case
konecty:delayed-task
konecty:mongo-counter
konecty:multiple-instances-status
konecty:user-presence

Expand All @@ -57,7 +54,6 @@ jalik:ufs-gridfs@1.0.2
jparker:gravatar
kadira:blaze-layout
kadira:flow-router
keepnox:perfect-scrollbar
mizzao:timesync
mrt:reactive-store
mystor:device-detection
Expand All @@ -74,24 +70,24 @@ littledata:synced-cron

edgee:slingshot
jalik:ufs-local@1.0.2
accounts-base@1.5.0
accounts-oauth@1.1.16
accounts-base@1.6.0
accounts-oauth@1.2.0
autoupdate@1.6.0
babel-compiler@7.5.2
google-oauth@1.2.6
babel-compiler@7.5.3
google-oauth@1.3.0
htmljs
less
matb33:collection-hooks
meteorhacks:inject-initial
oauth@1.2.8
oauth2@1.2.1
oauth@1.3.0
oauth2@1.3.0
routepolicy@1.1.0
sha@1.0.9
templating
webapp@1.8.0
webapp@1.9.1
webapp-hashing@1.0.9
rocketchat:oauth2-server
rocketchat:i18n
rocketchat:postcss
dandv:caret-position
facts-base
facts-base@1.0.1
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.9.2
METEOR@1.10.2
63 changes: 29 additions & 34 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
accounts-base@1.5.0
accounts-base@1.6.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.1.16
accounts-password@1.5.3
accounts-oauth@1.2.0
accounts-password@1.6.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.2
babel-compiler@7.5.3
babel-runtime@1.5.0
base64@1.0.12
binary-heap@1.0.11
blaze@2.3.4
blaze-html-templates@1.1.2
blaze-tools@1.0.10
boilerplate-generator@1.6.0
caching-compiler@1.2.1
boilerplate-generator@1.7.0
caching-compiler@1.2.2
caching-html-compiler@1.1.3
callback-hook@1.3.0
cfs:http-methods@0.0.32
Expand All @@ -33,28 +33,28 @@ 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.1
ecmascript@0.14.2
dynamic-import@0.5.2
ecmascript@0.14.3
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.10.0
ecmascript-runtime-server@0.9.0
edgee:slingshot@0.7.1
ejson@1.1.1
email@1.2.3
es5-shim@4.8.0
facebook-oauth@1.6.0
facebook-oauth@1.7.0
facts-base@1.0.1
fastclick@1.0.13
fetch@0.1.1
geojson-utils@1.0.10
github-oauth@1.2.3
google-oauth@1.2.6
google-oauth@1.3.0
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.4.2
id-map@1.1.0
inter-process-messaging@0.1.0
inter-process-messaging@0.1.1
jalik:ufs@1.0.2
jalik:ufs-gridfs@1.0.2
jalik:ufs-local@1.0.2
Expand All @@ -64,14 +64,10 @@ jparker:gravatar@0.5.1
jquery@1.11.11
kadira:blaze-layout@2.3.0
kadira:flow-router@2.12.1
keepnox:perfect-scrollbar@0.6.8
konecty:change-case@2.3.0
konecty:delayed-task@1.0.0
konecty:mongo-counter@0.0.5_3
konecty:multiple-instances-status@1.1.0
konecty:user-presence@2.6.3
launch-screen@1.1.1
less@2.8.0
launch-screen@1.2.0
less@3.0.1
littledata:synced-cron@1.5.1
livedata@1.0.18
localstorage@1.2.0
Expand All @@ -85,37 +81,36 @@ meteorhacks:inject-initial@1.0.4
meteorspark:util@0.2.0
minifier-css@1.5.0
minifier-js@2.6.0
minimongo@1.4.5
minimongo@1.6.0
mizzao:timesync@0.3.4
mobile-experience@1.0.5
mobile-status-bar@1.0.14
mobile-experience@1.1.0
mobile-status-bar@1.1.0
modern-browsers@0.1.5
modules@0.15.0
modules-runtime@0.12.0
mongo@1.8.1
mongo@1.10.0
mongo-decimal@0.1.1
mongo-dev-server@1.1.0
mongo-id@1.0.7
mongo-livedata@1.0.12
mrt:reactive-store@0.0.1
mystor:device-detection@0.2.0
nimble:restivus@0.8.12
nooitaf:colors@1.1.2_1
npm-bcrypt@0.9.3
npm-mongo@3.3.0
oauth@1.2.8
oauth1@1.2.2
oauth2@1.2.1
npm-mongo@3.7.0
oauth@1.3.0
oauth1@1.3.0
oauth2@1.3.0
observe-sequence@1.0.16
ordered-dict@1.1.0
ostrio:cookies@2.5.0
ostrio:cookies@2.6.0
pauli:accounts-linkedin@5.0.0
pauli:linkedin-oauth@5.0.0
promise@0.11.2
raix:eventemitter@0.1.3
raix:handlebar-helpers@0.2.5
raix:ui-dropped-event@0.0.7
random@1.1.0
random@1.2.0
rate-limit@1.0.9
reactive-dict@1.3.0
reactive-var@1.0.11
Expand All @@ -133,22 +128,22 @@ routepolicy@1.1.0
service-configuration@1.0.11
session@1.2.0
sha@1.0.9
shell-server@0.4.0
shell-server@0.5.0
simple:json-routes@2.1.0
socket-stream-client@0.2.3
socket-stream-client@0.3.0
spacebars@1.0.15
spacebars-compiler@1.1.3
srp@1.0.12
srp@1.1.0
standard-minifier-js@2.6.0
templating@1.3.2
templating-compiler@1.3.3
templating-runtime@1.3.2
templating-tools@1.1.2
tracker@1.2.0
twitter-oauth@1.2.0
typescript@3.7.5
typescript@3.7.6
ui@1.0.13
underscore@1.0.10
url@1.2.0
webapp@1.8.2
url@1.3.0
webapp@1.9.1
webapp-hashing@1.0.9
5 changes: 3 additions & 2 deletions app/lib/server/functions/notifications/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export function shouldNotifyAudio({
hasMentionToUser,
hasReplyToThread,
roomType,
isThread,
}) {
if (disableAllMessageNotifications && audioNotifications == null && !hasReplyToThread) {
return false;
Expand All @@ -23,15 +24,15 @@ export function shouldNotifyAudio({
}

if (!audioNotifications) {
if (settings.get('Accounts_Default_User_Preferences_audioNotifications') === 'all') {
if (settings.get('Accounts_Default_User_Preferences_audioNotifications') === 'all' && (!isThread || hasReplyToThread)) {
return true;
}
if (settings.get('Accounts_Default_User_Preferences_audioNotifications') === 'nothing') {
return false;
}
}

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

export function notifyAudioUser(userId, message, room) {
Expand Down
5 changes: 3 additions & 2 deletions app/lib/server/functions/notifications/desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export function shouldNotifyDesktop({
hasMentionToUser,
hasReplyToThread,
roomType,
isThread,
}) {
if (disableAllMessageNotifications && desktopNotifications == null && !isHighlighted && !hasMentionToUser && !hasReplyToThread) {
return false;
Expand All @@ -63,13 +64,13 @@ export function shouldNotifyDesktop({
}

if (!desktopNotifications) {
if (settings.get('Accounts_Default_User_Preferences_desktopNotifications') === 'all') {
if (settings.get('Accounts_Default_User_Preferences_desktopNotifications') === 'all' && (!isThread || hasReplyToThread)) {
return true;
}
if (settings.get('Accounts_Default_User_Preferences_desktopNotifications') === 'nothing') {
return false;
}
}

return roomType === 'd' || (!disableAllMessageNotifications && (hasMentionToAll || hasMentionToHere)) || isHighlighted || desktopNotifications === 'all' || hasMentionToUser || hasReplyToThread;
return (roomType === 'd' || (!disableAllMessageNotifications && (hasMentionToAll || hasMentionToHere)) || isHighlighted || desktopNotifications === 'all' || hasMentionToUser) && (!isThread || hasReplyToThread);
}
3 changes: 2 additions & 1 deletion app/lib/server/functions/notifications/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export function shouldNotifyEmail({
hasMentionToAll,
hasReplyToThread,
roomType,
isThread,
}) {
// email notifications are disabled globally
if (!settings.get('Accounts_AllowEmailNotifications')) {
Expand All @@ -195,5 +196,5 @@ export function shouldNotifyEmail({
}
}

return roomType === 'd' || isHighlighted || emailNotifications === 'all' || hasMentionToUser || hasReplyToThread || (!disableAllMessageNotifications && hasMentionToAll);
return (roomType === 'd' || isHighlighted || emailNotifications === 'all' || hasMentionToUser || (!disableAllMessageNotifications && hasMentionToAll)) && (!isThread || hasReplyToThread);
}
6 changes: 4 additions & 2 deletions app/lib/server/functions/notifications/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export async function getPushData({ room, message, userId, receiverUsername, sen
type: room.t,
name: room.name,
messageType: message.t,
tmid: message.tmid,
},
roomName: settings.get('Push_show_username_room') && roomTypes.getConfig(room.t).isGroupChat(room) ? `#${ roomTypes.getRoomName(room.t, room) }` : '',
username,
Expand All @@ -69,6 +70,7 @@ export function shouldNotifyMobile({
hasMentionToUser,
hasReplyToThread,
roomType,
isThread,
}) {
if (disableAllMessageNotifications && mobilePushNotifications == null && !isHighlighted && !hasMentionToUser && !hasReplyToThread) {
return false;
Expand All @@ -79,13 +81,13 @@ export function shouldNotifyMobile({
}

if (!mobilePushNotifications) {
if (settings.get('Accounts_Default_User_Preferences_mobileNotifications') === 'all') {
if (settings.get('Accounts_Default_User_Preferences_mobileNotifications') === 'all' && (!isThread || hasReplyToThread)) {
return true;
}
if (settings.get('Accounts_Default_User_Preferences_mobileNotifications') === 'nothing') {
return false;
}
}

return roomType === 'd' || (!disableAllMessageNotifications && hasMentionToAll) || isHighlighted || mobilePushNotifications === 'all' || hasMentionToUser || hasReplyToThread;
return (roomType === 'd' || (!disableAllMessageNotifications && hasMentionToAll) || isHighlighted || mobilePushNotifications === 'all' || hasMentionToUser) && (!isThread || hasReplyToThread);
}
Loading

0 comments on commit 3ee42b6

Please sign in to comment.