mirror of
https://bitbucket.org/skobkin/chrome_point_plus.git
synced 2024-11-23 18:56:04 +00:00
Posts notification option check fix.
This commit is contained in:
parent
4203ba62ed
commit
612052e5ca
|
@ -486,16 +486,17 @@ $(document).ready(function() {
|
||||||
console.groupCollapsed('ws-post #%s', wsMessage.post_id);
|
console.groupCollapsed('ws-post #%s', wsMessage.post_id);
|
||||||
|
|
||||||
console.debug(wsMessage);
|
console.debug(wsMessage);
|
||||||
|
if (options.is('option_ws_posts')) {
|
||||||
if (options.is('option_ws_posts_notifications')) {
|
if (options.is('option_ws_posts_notifications')) {
|
||||||
console.log('Showing desktop notification');
|
console.log('Showing desktop notification');
|
||||||
chrome.runtime.sendMessage({
|
chrome.runtime.sendMessage({
|
||||||
type: 'showNotification',
|
type: 'showNotification',
|
||||||
notificationId: 'post_' + wsMessage.post_id,
|
notificationId: 'post_' + wsMessage.post_id,
|
||||||
avatarUrl: getProtocol() + '//point.im/avatar/' + wsMessage.author + '/80',
|
avatarUrl: getProtocol() + '//point.im/avatar/' + wsMessage.author + '/80',
|
||||||
title: 'Post by @' + wsMessage.author + ' #' + wsMessage.post_id,
|
title: 'Post by @' + wsMessage.author + ' #' + wsMessage.post_id,
|
||||||
text: wsMessage.text
|
text: wsMessage.text
|
||||||
}, function(response) {});
|
}, function(response) {});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.groupEnd();
|
console.groupEnd();
|
||||||
|
|
Loading…
Reference in a new issue