Skip to content

Commit

Permalink
v3.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneys committed Jan 19, 2017
1 parent dd43d21 commit 0a47efd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
19 changes: 14 additions & 5 deletions app/scripts/renderer/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,30 @@ let registerPushProxyobject = () => {
let pushExists = Boolean(window.pb.api.pushes.all.filter(function(push) { return push.iden === newPush.iden; }).length);
if (pushExists) { return false; }

// Check if push is targeted to specific device id
// Default: Show push
let appIsTarget = true;
let devicesObjs = window.pb.api.devices.objs;
let targetIden = newPush.target_device_iden;
if (targetIden && devicesObjs[targetIden]) {
if (devicesObjs[targetIden].model && (devicesObjs[targetIden].model !== 'pb-for-desktop')) {

// Check if push is targeted to specific device
let currentDevicesObjs = window.pb.api.devices.objs;
let targetDeviceIden = newPush.target_device_iden;
if (targetDeviceIden && currentDevicesObjs[targetDeviceIden]) {
if (currentDevicesObjs[targetDeviceIden].model && (currentDevicesObjs[targetDeviceIden].model !== 'pb-for-desktop')) {
appIsTarget = false;
}
}

// Check if push is directed
let targetDirection = newPush.direction;
if (targetDirection && targetDirection === 'outgoing') {
appIsTarget = false;
}

if (appIsTarget) { pbPush.enqueuePush(newPush); }

pushesObj[iden] = newPush;

logger.debug('inject', 'proxy', 'iden', iden, 'appIsTarget', appIsTarget, 'pushExists', pushExists);
logger.debug('inject', newPush);
}
});

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pb-for-desktop",
"productName": "PB for Desktop",
"version": "3.2.0",
"version": "3.2.1",
"description": "PushBullet desktop application for macOS, Windows and Linux",
"license": "MIT",
"homepage": "https://sidneys.github.io/pb-for-desktop",
Expand Down Expand Up @@ -57,8 +57,8 @@
"electron-editor-context-menu": "^1.1.1",
"electron-settings": "^2.2.2",
"electron-squirrel-startup": "^1.0.0",
"file-type": "^4.0.0",
"file-url": "^2.0.0",
"file-type": "^4.1.0",
"file-url": "^2.0.1",
"fs-extra": "^2.0.0",
"is-online": "^6.0.1",
"keypath": "^0.0.1",
Expand Down

0 comments on commit 0a47efd

Please sign in to comment.