Don't show in-app notifications if stream desktop notifications are disabled.

(imported from commit efa29afaa40b65557149ea8a2cbc60e1bc44bee2)
This commit is contained in:
Jessica McKellar
2014-03-03 16:59:15 -05:00
parent 2761f1338d
commit df7f85d3c3

View File

@@ -430,11 +430,12 @@ exports.received_messages = function (messages) {
message.notification_sent = true;
if (should_send_desktop_notification(message) &&
browser_desktop_notifications_on()) {
process_notification({message: message, webkit_notify: true});
} else {
process_notification({message: message, webkit_notify: false});
if (should_send_desktop_notification(message)) {
if (browser_desktop_notifications_on()) {
process_notification({message: message, webkit_notify: true});
} else {
process_notification({message: message, webkit_notify: false});
}
}
if (should_send_audible_notification(message) && supports_sound) {
if (window.bridge !== undefined) {