{"action":"created","comment":{"url":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls/comments/51648252","id":51648252,"diff_hunk":"@@ -221,6 +229,87 @@ WallComponent.prototype._initializeWallView = function (opts) {\n     this.more.pipe(this._wallView.more);\n };\n \n+\n+WallComponent.prototype._initializeEmitter = function (opts) {\n+    opts = opts || {};\n+    var EmitterCls = opts.emitter || InsightsBasicEmitter;\n+\n+    this._emitter = new EmitterCls({\n+        appName: opts.appName,\n+        network: opts.collection.network,\n+        siteId: opts.collection.siteId,\n+        uuid: this._uuid,\n+        name: 'Media Wall',\n+        version: packageAttribute.value.split('#')[1],\n+        type: 'App',\n+        debug: opts.emitterDebug,\n+        disabled: opts.emitterDisabled\n+    });\n+    \n+    var self = this;\n+    var emitter = this._emitter;\n+\n+    // Init listner\n+    emitter.once('emitter:registered', function () {\n+        emitter.send(ActivityTypes.INIT);\n+    });\n+    emitter.registerApp();\n+\n+    if (this._wallView) {\n+        var view = this._wallView;\n+\n+        // App loaded listener\n+        var cnt = 0;\n+        var checkGoalTimer = null;\n+        var checkGoal = function (content) {\n+            if (checkGoalTimer) {\n+                clearTimeout(checkGoalTimer);\n+            }\n+\n+            // Check for existence of content first.. if it's empty,\n+            // it means we came from the timeout as opposed to the\n+            // actual \"add\" trigger, and that means we never met the\n+            // goal because there is less content than the goal\n+            // provided.\n+            if (content && ++cnt <= view.more.getGoal()) {\n+                // Save off the collectionId for later at this point because\n+                // its not available until we start adding content in\n+                if (!self.collectionId && self._collection.id) {\n+                    emitter.collectionId = self._collection.id;\n+                }\n+                checkGoalTimer = setTimeout(checkGoal.bind(this, null), 100);\n+\n+                return;\n+            }\n+\n+            view.removeListener('added', checkGoal);\n+            emitter.send(ActivityTypes.LOAD);\n+        };\n+        view.on('added', checkGoal);\n+\n+        // Show more listener\n+        if (view.showMoreButton\n+            && view.showMoreButton.$el) {","path":"src/wall-component.js","position":93,"original_position":93,"commit_id":"d07c869209502e24df92cde282914614387a4631","original_commit_id":"d07c869209502e24df92cde282914614387a4631","user":{"login":"markdoten","id":521957,"avatar_url":"https://avatars.githubusercontent.com/u/521957?v=3","gravatar_id":"","url":"https://api.github.com/users/markdoten","html_url":"https://github.com/markdoten","followers_url":"https://api.github.com/users/markdoten/followers","following_url":"https://api.github.com/users/markdoten/following{/other_user}","gists_url":"https://api.github.com/users/markdoten/gists{/gist_id}","starred_url":"https://api.github.com/users/markdoten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdoten/subscriptions","organizations_url":"https://api.github.com/users/markdoten/orgs","repos_url":"https://api.github.com/users/markdoten/repos","events_url":"https://api.github.com/users/markdoten/events{/privacy}","received_events_url":"https://api.github.com/users/markdoten/received_events","type":"User","site_admin":false},"body":"Probably don't need a separate line, this can't be more than 80 chars.","created_at":"2016-02-02T22:38:22Z","updated_at":"2016-02-02T22:38:22Z","html_url":"https://github.com/Livefyre/streamhub-wall/pull/142#discussion_r51648252","pull_request_url":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls/142","_links":{"self":{"href":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls/comments/51648252"},"html":{"href":"https://github.com/Livefyre/streamhub-wall/pull/142#discussion_r51648252"},"pull_request":{"href":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls/142"}}},"pull_request":{"url":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls/142","id":58060017,"html_url":"https://github.com/Livefyre/streamhub-wall/pull/142","diff_url":"https://github.com/Livefyre/streamhub-wall/pull/142.diff","patch_url":"https://github.com/Livefyre/streamhub-wall/pull/142.patch","issue_url":"https://api.github.com/repos/Livefyre/streamhub-wall/issues/142","number":142,"state":"open","locked":false,"title":"D insights emitter","user":{"login":"derekchinn","id":1576943,"avatar_url":"https://avatars.githubusercontent.com/u/1576943?v=3","gravatar_id":"","url":"https://api.github.com/users/derekchinn","html_url":"https://github.com/derekchinn","followers_url":"https://api.github.com/users/derekchinn/followers","following_url":"https://api.github.com/users/derekchinn/following{/other_user}","gists_url":"https://api.github.com/users/derekchinn/gists{/gist_id}","starred_url":"https://api.github.com/users/derekchinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekchinn/subscriptions","organizations_url":"https://api.github.com/users/derekchinn/orgs","repos_url":"https://api.github.com/users/derekchinn/repos","events_url":"https://api.github.com/users/derekchinn/events{/privacy}","received_events_url":"https://api.github.com/users/derekchinn/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-02T22:21:49Z","updated_at":"2016-02-02T22:38:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"014df4bf13d54737f55c4628bf1c85e912cfa76a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls/142/commits","review_comments_url":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls/142/comments","review_comment_url":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Livefyre/streamhub-wall/issues/142/comments","statuses_url":"https://api.github.com/repos/Livefyre/streamhub-wall/statuses/d07c869209502e24df92cde282914614387a4631","head":{"label":"Livefyre:d_insights_emitter","ref":"d_insights_emitter","sha":"d07c869209502e24df92cde282914614387a4631","user":{"login":"Livefyre","id":404382,"avatar_url":"https://avatars.githubusercontent.com/u/404382?v=3","gravatar_id":"","url":"https://api.github.com/users/Livefyre","html_url":"https://github.com/Livefyre","followers_url":"https://api.github.com/users/Livefyre/followers","following_url":"https://api.github.com/users/Livefyre/following{/other_user}","gists_url":"https://api.github.com/users/Livefyre/gists{/gist_id}","starred_url":"https://api.github.com/users/Livefyre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Livefyre/subscriptions","organizations_url":"https://api.github.com/users/Livefyre/orgs","repos_url":"https://api.github.com/users/Livefyre/repos","events_url":"https://api.github.com/users/Livefyre/events{/privacy}","received_events_url":"https://api.github.com/users/Livefyre/received_events","type":"Organization","site_admin":false},"repo":{"id":9763136,"name":"streamhub-wall","full_name":"Livefyre/streamhub-wall","owner":{"login":"Livefyre","id":404382,"avatar_url":"https://avatars.githubusercontent.com/u/404382?v=3","gravatar_id":"","url":"https://api.github.com/users/Livefyre","html_url":"https://github.com/Livefyre","followers_url":"https://api.github.com/users/Livefyre/followers","following_url":"https://api.github.com/users/Livefyre/following{/other_user}","gists_url":"https://api.github.com/users/Livefyre/gists{/gist_id}","starred_url":"https://api.github.com/users/Livefyre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Livefyre/subscriptions","organizations_url":"https://api.github.com/users/Livefyre/orgs","repos_url":"https://api.github.com/users/Livefyre/repos","events_url":"https://api.github.com/users/Livefyre/events{/privacy}","received_events_url":"https://api.github.com/users/Livefyre/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Livefyre/streamhub-wall","description":"Create tiled Media Walls displaying social content from Livefyre StreamHub Collecitons","fork":false,"url":"https://api.github.com/repos/Livefyre/streamhub-wall","forks_url":"https://api.github.com/repos/Livefyre/streamhub-wall/forks","keys_url":"https://api.github.com/repos/Livefyre/streamhub-wall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Livefyre/streamhub-wall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Livefyre/streamhub-wall/teams","hooks_url":"https://api.github.com/repos/Livefyre/streamhub-wall/hooks","issue_events_url":"https://api.github.com/repos/Livefyre/streamhub-wall/issues/events{/number}","events_url":"https://api.github.com/repos/Livefyre/streamhub-wall/events","assignees_url":"https://api.github.com/repos/Livefyre/streamhub-wall/assignees{/user}","branches_url":"https://api.github.com/repos/Livefyre/streamhub-wall/branches{/branch}","tags_url":"https://api.github.com/repos/Livefyre/streamhub-wall/tags","blobs_url":"https://api.github.com/repos/Livefyre/streamhub-wall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Livefyre/streamhub-wall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Livefyre/streamhub-wall/git/refs{/sha}","trees_url":"https://api.github.com/repos/Livefyre/streamhub-wall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Livefyre/streamhub-wall/statuses/{sha}","languages_url":"https://api.github.com/repos/Livefyre/streamhub-wall/languages","stargazers_url":"https://api.github.com/repos/Livefyre/streamhub-wall/stargazers","contributors_url":"https://api.github.com/repos/Livefyre/streamhub-wall/contributors","subscribers_url":"https://api.github.com/repos/Livefyre/streamhub-wall/subscribers","subscription_url":"https://api.github.com/repos/Livefyre/streamhub-wall/subscription","commits_url":"https://api.github.com/repos/Livefyre/streamhub-wall/commits{/sha}","git_commits_url":"https://api.github.com/repos/Livefyre/streamhub-wall/git/commits{/sha}","comments_url":"https://api.github.com/repos/Livefyre/streamhub-wall/comments{/number}","issue_comment_url":"https://api.github.com/repos/Livefyre/streamhub-wall/issues/comments{/number}","contents_url":"https://api.github.com/repos/Livefyre/streamhub-wall/contents/{+path}","compare_url":"https://api.github.com/repos/Livefyre/streamhub-wall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Livefyre/streamhub-wall/merges","archive_url":"https://api.github.com/repos/Livefyre/streamhub-wall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Livefyre/streamhub-wall/downloads","issues_url":"https://api.github.com/repos/Livefyre/streamhub-wall/issues{/number}","pulls_url":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls{/number}","milestones_url":"https://api.github.com/repos/Livefyre/streamhub-wall/milestones{/number}","notifications_url":"https://api.github.com/repos/Livefyre/streamhub-wall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Livefyre/streamhub-wall/labels{/name}","releases_url":"https://api.github.com/repos/Livefyre/streamhub-wall/releases{/id}","deployments_url":"https://api.github.com/repos/Livefyre/streamhub-wall/deployments","created_at":"2013-04-30T03:15:40Z","updated_at":"2016-01-15T19:21:41Z","pushed_at":"2016-02-02T22:21:49Z","git_url":"git://github.com/Livefyre/streamhub-wall.git","ssh_url":"git@github.com:Livefyre/streamhub-wall.git","clone_url":"https://github.com/Livefyre/streamhub-wall.git","svn_url":"https://github.com/Livefyre/streamhub-wall","homepage":"http://apps.livefyre.com/packages/Livefyre/streamhub-wall/master/overview","size":2242,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":7,"forks":5,"open_issues":7,"watchers":13,"default_branch":"rc"}},"base":{"label":"Livefyre:master","ref":"master","sha":"09e3db785e30c776dbe83007d2240343a73597b9","user":{"login":"Livefyre","id":404382,"avatar_url":"https://avatars.githubusercontent.com/u/404382?v=3","gravatar_id":"","url":"https://api.github.com/users/Livefyre","html_url":"https://github.com/Livefyre","followers_url":"https://api.github.com/users/Livefyre/followers","following_url":"https://api.github.com/users/Livefyre/following{/other_user}","gists_url":"https://api.github.com/users/Livefyre/gists{/gist_id}","starred_url":"https://api.github.com/users/Livefyre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Livefyre/subscriptions","organizations_url":"https://api.github.com/users/Livefyre/orgs","repos_url":"https://api.github.com/users/Livefyre/repos","events_url":"https://api.github.com/users/Livefyre/events{/privacy}","received_events_url":"https://api.github.com/users/Livefyre/received_events","type":"Organization","site_admin":false},"repo":{"id":9763136,"name":"streamhub-wall","full_name":"Livefyre/streamhub-wall","owner":{"login":"Livefyre","id":404382,"avatar_url":"https://avatars.githubusercontent.com/u/404382?v=3","gravatar_id":"","url":"https://api.github.com/users/Livefyre","html_url":"https://github.com/Livefyre","followers_url":"https://api.github.com/users/Livefyre/followers","following_url":"https://api.github.com/users/Livefyre/following{/other_user}","gists_url":"https://api.github.com/users/Livefyre/gists{/gist_id}","starred_url":"https://api.github.com/users/Livefyre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Livefyre/subscriptions","organizations_url":"https://api.github.com/users/Livefyre/orgs","repos_url":"https://api.github.com/users/Livefyre/repos","events_url":"https://api.github.com/users/Livefyre/events{/privacy}","received_events_url":"https://api.github.com/users/Livefyre/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Livefyre/streamhub-wall","description":"Create tiled Media Walls displaying social content from Livefyre StreamHub Collecitons","fork":false,"url":"https://api.github.com/repos/Livefyre/streamhub-wall","forks_url":"https://api.github.com/repos/Livefyre/streamhub-wall/forks","keys_url":"https://api.github.com/repos/Livefyre/streamhub-wall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Livefyre/streamhub-wall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Livefyre/streamhub-wall/teams","hooks_url":"https://api.github.com/repos/Livefyre/streamhub-wall/hooks","issue_events_url":"https://api.github.com/repos/Livefyre/streamhub-wall/issues/events{/number}","events_url":"https://api.github.com/repos/Livefyre/streamhub-wall/events","assignees_url":"https://api.github.com/repos/Livefyre/streamhub-wall/assignees{/user}","branches_url":"https://api.github.com/repos/Livefyre/streamhub-wall/branches{/branch}","tags_url":"https://api.github.com/repos/Livefyre/streamhub-wall/tags","blobs_url":"https://api.github.com/repos/Livefyre/streamhub-wall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Livefyre/streamhub-wall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Livefyre/streamhub-wall/git/refs{/sha}","trees_url":"https://api.github.com/repos/Livefyre/streamhub-wall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Livefyre/streamhub-wall/statuses/{sha}","languages_url":"https://api.github.com/repos/Livefyre/streamhub-wall/languages","stargazers_url":"https://api.github.com/repos/Livefyre/streamhub-wall/stargazers","contributors_url":"https://api.github.com/repos/Livefyre/streamhub-wall/contributors","subscribers_url":"https://api.github.com/repos/Livefyre/streamhub-wall/subscribers","subscription_url":"https://api.github.com/repos/Livefyre/streamhub-wall/subscription","commits_url":"https://api.github.com/repos/Livefyre/streamhub-wall/commits{/sha}","git_commits_url":"https://api.github.com/repos/Livefyre/streamhub-wall/git/commits{/sha}","comments_url":"https://api.github.com/repos/Livefyre/streamhub-wall/comments{/number}","issue_comment_url":"https://api.github.com/repos/Livefyre/streamhub-wall/issues/comments{/number}","contents_url":"https://api.github.com/repos/Livefyre/streamhub-wall/contents/{+path}","compare_url":"https://api.github.com/repos/Livefyre/streamhub-wall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Livefyre/streamhub-wall/merges","archive_url":"https://api.github.com/repos/Livefyre/streamhub-wall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Livefyre/streamhub-wall/downloads","issues_url":"https://api.github.com/repos/Livefyre/streamhub-wall/issues{/number}","pulls_url":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls{/number}","milestones_url":"https://api.github.com/repos/Livefyre/streamhub-wall/milestones{/number}","notifications_url":"https://api.github.com/repos/Livefyre/streamhub-wall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Livefyre/streamhub-wall/labels{/name}","releases_url":"https://api.github.com/repos/Livefyre/streamhub-wall/releases{/id}","deployments_url":"https://api.github.com/repos/Livefyre/streamhub-wall/deployments","created_at":"2013-04-30T03:15:40Z","updated_at":"2016-01-15T19:21:41Z","pushed_at":"2016-02-02T22:21:49Z","git_url":"git://github.com/Livefyre/streamhub-wall.git","ssh_url":"git@github.com:Livefyre/streamhub-wall.git","clone_url":"https://github.com/Livefyre/streamhub-wall.git","svn_url":"https://github.com/Livefyre/streamhub-wall","homepage":"http://apps.livefyre.com/packages/Livefyre/streamhub-wall/master/overview","size":2242,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":7,"forks":5,"open_issues":7,"watchers":13,"default_branch":"rc"}},"_links":{"self":{"href":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls/142"},"html":{"href":"https://github.com/Livefyre/streamhub-wall/pull/142"},"issue":{"href":"https://api.github.com/repos/Livefyre/streamhub-wall/issues/142"},"comments":{"href":"https://api.github.com/repos/Livefyre/streamhub-wall/issues/142/comments"},"review_comments":{"href":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls/142/comments"},"review_comment":{"href":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Livefyre/streamhub-wall/pulls/142/commits"},"statuses":{"href":"https://api.github.com/repos/Livefyre/streamhub-wall/statuses/d07c869209502e24df92cde282914614387a4631"}}}}