{"action":"created","comment":{"url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls/comments/58194830","id":58194830,"diff_hunk":"@@ -105,10 +106,30 @@ var BaseScanner = function (beaconMapper, beaconRegionMapper, beaconRegionMonito\n \n     this.startScanningAfterBinding = function () {\n         var knownBeacons = knownBeaconService.getKnownBeacons(self.networkId);\n-        if (!_.isEmpty(knownBeacons)) {\n-            startScanningOfKnownBeacons(knownBeacons);\n-        }\n+        var realBeacons = knownBeacons.filter(knownBeacon => !knownBeacon.get('is_geofence'));\n+        var geofenceBeacons = knownBeacons.filter(knownBeacon => knownBeacon.get('is_geofence'));\n+        startScanningOfKnownBeacons(realBeacons);\n         self.addAllEventListeners();\n+        self.startScanningGeofences(geofenceBeacons);\n+    };\n+\n+    this.startScanningGeofences = function(geofenceBeacons) {\n+        // fallback for locations who doesn't have physical-BLE-Beacons","path":"lib-ng/scanners/base.js","position":76,"original_position":76,"commit_id":"2045bb9af39ce317ad38e7876f8ab7502c704159","original_commit_id":"2045bb9af39ce317ad38e7876f8ab7502c704159","user":{"login":"adri","id":133832,"avatar_url":"https://avatars.githubusercontent.com/u/133832?v=3","gravatar_id":"","url":"https://api.github.com/users/adri","html_url":"https://github.com/adri","followers_url":"https://api.github.com/users/adri/followers","following_url":"https://api.github.com/users/adri/following{/other_user}","gists_url":"https://api.github.com/users/adri/gists{/gist_id}","starred_url":"https://api.github.com/users/adri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adri/subscriptions","organizations_url":"https://api.github.com/users/adri/orgs","repos_url":"https://api.github.com/users/adri/repos","events_url":"https://api.github.com/users/adri/events{/privacy}","received_events_url":"https://api.github.com/users/adri/received_events","type":"User","site_admin":false},"body":"\"fallback for locations who **don't** have physical-BLE-Beacons\"","created_at":"2016-04-01T11:46:00Z","updated_at":"2016-04-01T11:46:00Z","html_url":"https://github.com/Sensimity/com.sensimity.ti.client/pull/11#discussion_r58194830","pull_request_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls/comments/58194830"},"html":{"href":"https://github.com/Sensimity/com.sensimity.ti.client/pull/11#discussion_r58194830"},"pull_request":{"href":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls/11","id":64855290,"html_url":"https://github.com/Sensimity/com.sensimity.ti.client/pull/11","diff_url":"https://github.com/Sensimity/com.sensimity.ti.client/pull/11.diff","patch_url":"https://github.com/Sensimity/com.sensimity.ti.client/pull/11.patch","issue_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/issues/11","number":11,"state":"open","locked":false,"title":"[BEACON-415] Support for geofences","user":{"login":"williamrijksen","id":1991582,"avatar_url":"https://avatars.githubusercontent.com/u/1991582?v=3","gravatar_id":"","url":"https://api.github.com/users/williamrijksen","html_url":"https://github.com/williamrijksen","followers_url":"https://api.github.com/users/williamrijksen/followers","following_url":"https://api.github.com/users/williamrijksen/following{/other_user}","gists_url":"https://api.github.com/users/williamrijksen/gists{/gist_id}","starred_url":"https://api.github.com/users/williamrijksen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williamrijksen/subscriptions","organizations_url":"https://api.github.com/users/williamrijksen/orgs","repos_url":"https://api.github.com/users/williamrijksen/repos","events_url":"https://api.github.com/users/williamrijksen/events{/privacy}","received_events_url":"https://api.github.com/users/williamrijksen/received_events","type":"User","site_admin":false},"body":"Ticket: https://enrise.atlassian.net/browse/BEACON-415.\r\n\r\n- introduces BABEL\r\n- introduces the support for geofences on iOS (max 20)","created_at":"2016-03-31T20:42:00Z","updated_at":"2016-04-01T11:46:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62f316b649813d685262af4cf23f4508c06d9c1e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls/11/commits","review_comments_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls/11/comments","review_comment_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/issues/11/comments","statuses_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/statuses/2045bb9af39ce317ad38e7876f8ab7502c704159","head":{"label":"williamrijksen:feature/BEACON-415","ref":"feature/BEACON-415","sha":"2045bb9af39ce317ad38e7876f8ab7502c704159","user":{"login":"williamrijksen","id":1991582,"avatar_url":"https://avatars.githubusercontent.com/u/1991582?v=3","gravatar_id":"","url":"https://api.github.com/users/williamrijksen","html_url":"https://github.com/williamrijksen","followers_url":"https://api.github.com/users/williamrijksen/followers","following_url":"https://api.github.com/users/williamrijksen/following{/other_user}","gists_url":"https://api.github.com/users/williamrijksen/gists{/gist_id}","starred_url":"https://api.github.com/users/williamrijksen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williamrijksen/subscriptions","organizations_url":"https://api.github.com/users/williamrijksen/orgs","repos_url":"https://api.github.com/users/williamrijksen/repos","events_url":"https://api.github.com/users/williamrijksen/events{/privacy}","received_events_url":"https://api.github.com/users/williamrijksen/received_events","type":"User","site_admin":false},"repo":{"id":40879649,"name":"com.sensimity.ti.client","full_name":"williamrijksen/com.sensimity.ti.client","owner":{"login":"williamrijksen","id":1991582,"avatar_url":"https://avatars.githubusercontent.com/u/1991582?v=3","gravatar_id":"","url":"https://api.github.com/users/williamrijksen","html_url":"https://github.com/williamrijksen","followers_url":"https://api.github.com/users/williamrijksen/followers","following_url":"https://api.github.com/users/williamrijksen/following{/other_user}","gists_url":"https://api.github.com/users/williamrijksen/gists{/gist_id}","starred_url":"https://api.github.com/users/williamrijksen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williamrijksen/subscriptions","organizations_url":"https://api.github.com/users/williamrijksen/orgs","repos_url":"https://api.github.com/users/williamrijksen/repos","events_url":"https://api.github.com/users/williamrijksen/events{/privacy}","received_events_url":"https://api.github.com/users/williamrijksen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/williamrijksen/com.sensimity.ti.client","description":"Client implementation for communication with the Sensimity platform","fork":true,"url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client","forks_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/forks","keys_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/teams","hooks_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/hooks","issue_events_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/issues/events{/number}","events_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/events","assignees_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/assignees{/user}","branches_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/branches{/branch}","tags_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/tags","blobs_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/git/refs{/sha}","trees_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/statuses/{sha}","languages_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/languages","stargazers_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/stargazers","contributors_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/contributors","subscribers_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/subscribers","subscription_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/subscription","commits_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/commits{/sha}","git_commits_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/git/commits{/sha}","comments_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/comments{/number}","issue_comment_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/issues/comments{/number}","contents_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/contents/{+path}","compare_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/merges","archive_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/downloads","issues_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/issues{/number}","pulls_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/pulls{/number}","milestones_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/milestones{/number}","notifications_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/labels{/name}","releases_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/releases{/id}","deployments_url":"https://api.github.com/repos/williamrijksen/com.sensimity.ti.client/deployments","created_at":"2015-08-17T08:59:16Z","updated_at":"2016-03-02T12:38:50Z","pushed_at":"2016-04-01T11:44:44Z","git_url":"git://github.com/williamrijksen/com.sensimity.ti.client.git","ssh_url":"git@github.com:williamrijksen/com.sensimity.ti.client.git","clone_url":"https://github.com/williamrijksen/com.sensimity.ti.client.git","svn_url":"https://github.com/williamrijksen/com.sensimity.ti.client","homepage":null,"size":267,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"Sensimity:feature/geofence-support","ref":"feature/geofence-support","sha":"ab873d164891ec8df59ccceac92eae04294a73c8","user":{"login":"Sensimity","id":10994526,"avatar_url":"https://avatars.githubusercontent.com/u/10994526?v=3","gravatar_id":"","url":"https://api.github.com/users/Sensimity","html_url":"https://github.com/Sensimity","followers_url":"https://api.github.com/users/Sensimity/followers","following_url":"https://api.github.com/users/Sensimity/following{/other_user}","gists_url":"https://api.github.com/users/Sensimity/gists{/gist_id}","starred_url":"https://api.github.com/users/Sensimity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sensimity/subscriptions","organizations_url":"https://api.github.com/users/Sensimity/orgs","repos_url":"https://api.github.com/users/Sensimity/repos","events_url":"https://api.github.com/users/Sensimity/events{/privacy}","received_events_url":"https://api.github.com/users/Sensimity/received_events","type":"Organization","site_admin":false},"repo":{"id":38877886,"name":"com.sensimity.ti.client","full_name":"Sensimity/com.sensimity.ti.client","owner":{"login":"Sensimity","id":10994526,"avatar_url":"https://avatars.githubusercontent.com/u/10994526?v=3","gravatar_id":"","url":"https://api.github.com/users/Sensimity","html_url":"https://github.com/Sensimity","followers_url":"https://api.github.com/users/Sensimity/followers","following_url":"https://api.github.com/users/Sensimity/following{/other_user}","gists_url":"https://api.github.com/users/Sensimity/gists{/gist_id}","starred_url":"https://api.github.com/users/Sensimity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sensimity/subscriptions","organizations_url":"https://api.github.com/users/Sensimity/orgs","repos_url":"https://api.github.com/users/Sensimity/repos","events_url":"https://api.github.com/users/Sensimity/events{/privacy}","received_events_url":"https://api.github.com/users/Sensimity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sensimity/com.sensimity.ti.client","description":"Client implementation for communication with the Sensimity platform","fork":false,"url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client","forks_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/forks","keys_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/teams","hooks_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/hooks","issue_events_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/issues/events{/number}","events_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/events","assignees_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/assignees{/user}","branches_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/branches{/branch}","tags_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/tags","blobs_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/statuses/{sha}","languages_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/languages","stargazers_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/stargazers","contributors_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/contributors","subscribers_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/subscribers","subscription_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/subscription","commits_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/contents/{+path}","compare_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/merges","archive_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/downloads","issues_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/issues{/number}","pulls_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls{/number}","milestones_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/milestones{/number}","notifications_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/labels{/name}","releases_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/releases{/id}","deployments_url":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/deployments","created_at":"2015-07-10T11:50:09Z","updated_at":"2016-03-30T07:15:08Z","pushed_at":"2016-04-01T09:46:22Z","git_url":"git://github.com/Sensimity/com.sensimity.ti.client.git","ssh_url":"git@github.com:Sensimity/com.sensimity.ti.client.git","clone_url":"https://github.com/Sensimity/com.sensimity.ti.client.git","svn_url":"https://github.com/Sensimity/com.sensimity.ti.client","homepage":null,"size":214,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls/11"},"html":{"href":"https://github.com/Sensimity/com.sensimity.ti.client/pull/11"},"issue":{"href":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/issues/11"},"comments":{"href":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/Sensimity/com.sensimity.ti.client/statuses/2045bb9af39ce317ad38e7876f8ab7502c704159"}}}}