Skip to content

Commit

Permalink
Merge branch 'develop' into shield
Browse files Browse the repository at this point in the history
  • Loading branch information
geekgonecrazy authored Feb 16, 2018
2 parents bbc492c + b63eae7 commit 292cb24
Show file tree
Hide file tree
Showing 107 changed files with 14,499 additions and 1,550 deletions.
32 changes: 16 additions & 16 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,37 @@

rocketchat:cors

accounts-facebook@1.3.0
accounts-github@1.4.0
accounts-google@1.3.0
accounts-meteor-developer@1.4.0
accounts-facebook@1.3.1
accounts-github@1.4.1
accounts-google@1.3.1
accounts-meteor-developer@1.4.1
accounts-password@1.5.0
accounts-twitter@1.4.0
accounts-twitter@1.4.1
blaze-html-templates
check@1.2.5
check@1.3.0
ddp-rate-limiter@1.0.7
ddp-common@1.3.0
dynamic-import@0.2.0
ecmascript@0.9.0
ddp-common@1.4.0
dynamic-import@0.3.0
ecmascript@0.10.0
ejson@1.1.0
email@1.2.3
fastclick@1.0.13
http@1.3.0
http@1.4.0
jquery@1.11.10
logging@1.1.19
meteor-base@1.2.0
meteor-base@1.3.0
mobile-experience@1.0.5
mongo@1.3.1
random@1.0.10
mongo@1.4.2
random@1.1.0
rate-limit@1.0.8
reactive-dict@1.2.0
reactive-var@1.0.11
reload@1.1.11
reload@1.2.0
service-configuration@1.0.11
session@1.1.7
shell-server@0.3.0
shell-server@0.3.1
spacebars
standard-minifier-js@2.2.0
standard-minifier-js@2.3.1
tracker@1.1.3

rocketchat:2fa
Expand Down
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.6.0.1
METEOR@1.6.1
77 changes: 40 additions & 37 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,41 @@ accounts-password@1.5.0
accounts-twitter@1.4.1
aldeed:simple-schema@1.5.3
allow-deny@1.1.0
autoupdate@1.3.12
babel-compiler@6.24.7
babel-runtime@1.1.1
base64@1.0.10
autoupdate@1.4.0
babel-compiler@7.0.4
babel-runtime@1.2.2
base64@1.0.11
binary-heap@1.0.10
blaze@2.3.2
blaze-html-templates@1.1.2
blaze-tools@1.0.10
boilerplate-generator@1.3.1
caching-compiler@1.1.9
boilerplate-generator@1.4.0
caching-compiler@1.1.11
caching-html-compiler@1.1.2
callback-hook@1.0.10
callback-hook@1.1.0
cfs:http-methods@0.0.32
check@1.2.5
coffeescript@1.12.7_3
coffeescript-compiler@1.12.7_3
check@1.3.0
coffeescript@1.0.17
dandv:caret-position@2.1.1
ddp@1.4.0
ddp-client@2.2.0
ddp-common@1.3.0
ddp-client@2.3.1
ddp-common@1.4.0
ddp-rate-limiter@1.0.7
ddp-server@2.1.1
ddp-server@2.1.2
deepwell:bootstrap-datepicker2@1.3.0
deps@1.0.12
diff-sequence@1.0.7
diff-sequence@1.1.0
dispatch:run-as-user@1.1.1
dynamic-import@0.2.1
ecmascript@0.9.0
dynamic-import@0.3.0
ecmascript@0.10.4
ecmascript-runtime@0.5.0
ecmascript-runtime-client@0.5.0
ecmascript-runtime-client@0.6.2
ecmascript-runtime-server@0.5.0
edgee:slingshot@0.7.1
ejson@1.1.0
email@1.2.3
emojione:emojione@2.2.6
es5-shim@4.7.3
facebook-oauth@1.4.0
fastclick@1.0.13
francocatena:status@1.5.3
Expand All @@ -52,15 +52,15 @@ google-oauth@1.2.5
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.3.0
id-map@1.0.9
http@1.4.0
id-map@1.1.0
jalik:ufs@0.7.4_1
jalik:ufs-gridfs@0.2.1
jalik:ufs-local@0.2.9
jparker:crypto-core@0.1.0
jparker:crypto-md5@0.1.1
jparker:gravatar@0.5.1
jquery@1.11.10
jquery@1.11.11
kadira:blaze-layout@2.3.0
kadira:flow-router@2.12.1
keepnox:perfect-scrollbar@0.6.8
Expand All @@ -72,28 +72,28 @@ konecty:multiple-instances-status@1.1.0
konecty:nrr@2.0.2
konecty:user-presence@2.0.1
launch-screen@1.1.1
less@2.7.11
less@2.7.12
livedata@1.0.18
localstorage@1.2.0
logging@1.1.19
matb33:collection-hooks@0.8.4
mdg:validation-error@0.5.1
meteor@1.8.2
meteor-base@1.2.0
meteor-base@1.3.0
meteor-developer-oauth@1.2.0
meteorhacks:inject-initial@1.0.4
meteorhacks:meteorx@1.4.1
meteorspark:util@0.2.0
minifier-css@1.2.16
minifier-js@2.2.2
minifier-css@1.3.1
minifier-js@2.3.2
minimongo@1.4.3
mizzao:autocomplete@0.5.1
mizzao:timesync@0.3.4
mobile-experience@1.0.5
mobile-status-bar@1.0.14
modules@0.11.2
modules-runtime@0.9.1
mongo@1.3.1
modules@0.11.4
modules-runtime@0.9.2
mongo@1.4.3
mongo-dev-server@1.1.0
mongo-id@1.0.6
mongo-livedata@1.0.12
Expand All @@ -102,28 +102,28 @@ mystor:device-detection@0.2.0
nimble:restivus@0.8.12
nooitaf:colors@1.1.2_1
npm-bcrypt@0.9.3
npm-mongo@2.2.33
npm-mongo@2.2.34
oauth@1.2.1
oauth1@1.2.0
oauth2@1.2.0
observe-sequence@1.0.16
ordered-dict@1.0.9
ordered-dict@1.1.0
ostrio:cookies@2.2.4
pauli:accounts-linkedin@2.1.5
pauli:linkedin-oauth@1.2.0
percolate:synced-cron@1.3.2
promise@0.10.1
promise@0.10.2
raix:eventemitter@0.1.3
raix:eventstate@0.0.4
raix:handlebar-helpers@0.2.5
raix:push@3.3.0
raix:ui-dropped-event@0.0.7
random@1.0.10
rate-limit@1.0.8
random@1.1.0
rate-limit@1.0.9
reactive-dict@1.2.0
reactive-var@1.0.11
reload@1.1.11
retry@1.0.9
reload@1.2.0
retry@1.1.0
rocketchat:2fa@0.0.1
rocketchat:accounts@0.0.1
rocketchat:action-links@0.0.1
Expand Down Expand Up @@ -239,15 +239,18 @@ rocketchat:videobridge@0.2.0
rocketchat:webrtc@0.0.1
rocketchat:wordpress@0.0.1
routepolicy@1.0.12
server-render@0.3.0
service-configuration@1.0.11
session@1.1.7
sha@1.0.9
shell-server@0.3.1
shim-common@0.1.0
simple:json-routes@2.1.0
socket-stream-client@0.1.0
spacebars@1.0.15
spacebars-compiler@1.1.3
srp@1.0.10
standard-minifier-js@2.2.3
standard-minifier-js@2.3.2
steffo:meteor-accounts-saml@0.0.1
swydo:graphql@0.0.3
tap:i18n@1.8.2
Expand All @@ -260,8 +263,8 @@ tracker@1.1.3
twitter-oauth@1.2.0
ui@1.0.13
underscore@1.0.10
url@1.1.0
webapp@1.4.0
url@1.2.0
webapp@1.5.0
webapp-hashing@1.0.9
yasaricli:slugify@0.0.7
yasinuslu:blaze-meta@0.3.3
13 changes: 9 additions & 4 deletions client/notifications/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Meteor.startup(function() {
// This logic is duplicated in /client/startup/unread.coffee.
const hasFocus = readMessage.isEnable();
const messageIsInOpenedRoom = openedRoomId === notification.payload.rid;
const muteFocusedConversations = RocketChat.getUserPreference(Meteor.user(), 'muteFocusedConversations');

fireGlobalEvent('notification', {
notification,
Expand All @@ -42,10 +43,13 @@ Meteor.startup(function() {
KonchatNotification.newMessage(notification.payload.rid);
KonchatNotification.showDesktop(notification);
}
} else if (!(hasFocus && messageIsInOpenedRoom)) {
} else if (!hasFocus || !messageIsInOpenedRoom) {
// Play a sound and show a notification.
KonchatNotification.newMessage(notification.payload.rid);
KonchatNotification.showDesktop(notification);
} else if (!muteFocusedConversations) {
// Play a notification sound
KonchatNotification.newMessage(notification.payload.rid);
}
});

Expand All @@ -56,14 +60,15 @@ Meteor.startup(function() {
// This logic is duplicated in /client/startup/unread.coffee.
const hasFocus = readMessage.isEnable();
const messageIsInOpenedRoom = openedRoomId === notification.payload.rid;
const muteFocusedConversations = RocketChat.getUserPreference(Meteor.user(), 'muteFocusedConversations');

if (RocketChat.Layout.isEmbedded()) {
if (!hasFocus && messageIsInOpenedRoom) {
// Play a sound and show a notification.
// Play a notification sound
KonchatNotification.newMessage(notification.payload.rid);
}
} else if (!(hasFocus && messageIsInOpenedRoom)) {
// Play a sound and show a notification.
} else if (!hasFocus || !messageIsInOpenedRoom || !muteFocusedConversations) {
// Play a notification sound
KonchatNotification.newMessage(notification.payload.rid);
}
});
Expand Down
Loading

0 comments on commit 292cb24

Please sign in to comment.