{"action":"created","comment":{"url":"https://api.github.com/repos/concierge/Concierge/pulls/comments/77430269","id":77430269,"diff_hunk":"@@ -22,109 +23,116 @@ var sendMessageToMultiple = function (message, threads) {\n         };\n     };\n \n-exports.createIntegration = function (platform) {\n-    if (!platform.sendMessage) {\n-        platform.sendMessage = function() {\n-            throw new Error($$`What kind of shit platform is this that doesn\\'t even support sending messages?`);\n-        };\n+let IntegrationApi = module.exports = class {\n+    constructor(prefix) {\n+        this.commandPrefix = prefix || '/';\n+        this.sendMessage = _loopbackWrapper(this.sendMessage, this);\n+        this.sendUrl = _loopbackWrapper(this.sendUrl, this);\n     }\n-    platform.sendMessage = _loopbackWrapper(platform.sendMessage, platform);\n \n-    if (!platform.sendUrl) {\n-        platform.sendUrl = function(url, thread) {\n-            platform.sendMessage(url, thread); // fallback to sending a message\n-        };\n+    sendMessage() {\n+        throw new Error($$`What kind of shit platform is this that doesn\\'t even support sending messages?`);\n+    }\n+\n+    sendUrl(url, thread) {\n+        this.sendMessage(url, thread); // fallback to sending a message\n     }\n-    platform.sendUrl = _loopbackWrapper(platform.sendUrl, platform);\n \n-    if (!platform.sendImage) {\n-        platform.sendImage = function(type, image, description, thread) {\n-            switch(type) {\n+    sendImage(type, image, description, thread) {\n+        switch(type) {\n             case 'url': // fallback to sending a url\n-                platform.sendMessage(description, thread);\n-                platform.sendUrl(image, thread);\n+                this.sendMessage(description, thread);\n+                this.sendUrl(image, thread);\n                 break;\n             case 'file': // fallback to sending a file\n-                platform.sendFile(type, image, description, thread);\n+                this.sendFile(type, image, description, thread);\n                 break;\n             default: // fallback to sending a message\n-                platform.sendMessage(description, thread);\n-                platform.sendMessage($$`I also have something to send you but cant seem to do so...`, thread);\n+                this.sendMessage(description, thread);\n+                this.sendMessage($$`I also have something to send you but cant seem to do so...`, thread);\n                 break;\n-            }\n-        };\n+        }\n     }\n \n-    if (!platform.sendFile) {\n-        platform.sendFile = function(type, file, description, thread) {\n-            platform.sendMessage(description, thread);\n-            switch(type) {\n+    sendFile(type, file, description, thread) {\n+        this.sendMessage(description, thread);\n+        switch(type) {\n             case 'url': // fallback to sending a url\n-                platform.sendUrl(file, thread);\n+                this.sendUrl(file, thread);","path":"core/shim.js","position":92,"original_position":92,"commit_id":"c47b84d8bf37b322ce3f46349274c4d756ce0e81","original_commit_id":"c47b84d8bf37b322ce3f46349274c4d756ce0e81","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Expected indentation of 12 space characters but found 16. (indent)](https://www.codacy.com/app/theprojectshop/Kassy/file/3730721918/issues/source?bid=3282987&fileBranchId=3667386#l61)","created_at":"2016-09-03T03:19:00Z","updated_at":"2016-09-03T03:19:00Z","html_url":"https://github.com/concierge/Concierge/pull/209#discussion_r77430269","pull_request_url":"https://api.github.com/repos/concierge/Concierge/pulls/209","_links":{"self":{"href":"https://api.github.com/repos/concierge/Concierge/pulls/comments/77430269"},"html":{"href":"https://github.com/concierge/Concierge/pull/209#discussion_r77430269"},"pull_request":{"href":"https://api.github.com/repos/concierge/Concierge/pulls/209"}}},"pull_request":{"url":"https://api.github.com/repos/concierge/Concierge/pulls/209","id":83743768,"html_url":"https://github.com/concierge/Concierge/pull/209","diff_url":"https://github.com/concierge/Concierge/pull/209.diff","patch_url":"https://github.com/concierge/Concierge/pull/209.patch","issue_url":"https://api.github.com/repos/concierge/Concierge/issues/209","number":209,"state":"open","locked":false,"title":"4.0 alpha4","user":{"login":"mrkno","id":6830312,"avatar_url":"https://avatars.githubusercontent.com/u/6830312?v=3","gravatar_id":"","url":"https://api.github.com/users/mrkno","html_url":"https://github.com/mrkno","followers_url":"https://api.github.com/users/mrkno/followers","following_url":"https://api.github.com/users/mrkno/following{/other_user}","gists_url":"https://api.github.com/users/mrkno/gists{/gist_id}","starred_url":"https://api.github.com/users/mrkno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrkno/subscriptions","organizations_url":"https://api.github.com/users/mrkno/orgs","repos_url":"https://api.github.com/users/mrkno/repos","events_url":"https://api.github.com/users/mrkno/events{/privacy}","received_events_url":"https://api.github.com/users/mrkno/received_events","type":"User","site_admin":false},"body":"- Cleaned up config\r\n- Removed dead code\r\n- Kassy Module format:\r\n  - `api.random`\r\n  - `api.http`\r\n- Fixes #207 ","created_at":"2016-09-02T04:24:52Z","updated_at":"2016-09-03T03:19:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd37eae0620ef19b870a04ced5c15c2561feeda6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/concierge/Concierge/pulls/209/commits","review_comments_url":"https://api.github.com/repos/concierge/Concierge/pulls/209/comments","review_comment_url":"https://api.github.com/repos/concierge/Concierge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/concierge/Concierge/issues/209/comments","statuses_url":"https://api.github.com/repos/concierge/Concierge/statuses/c47b84d8bf37b322ce3f46349274c4d756ce0e81","head":{"label":"concierge:4.0-alpha4","ref":"4.0-alpha4","sha":"c47b84d8bf37b322ce3f46349274c4d756ce0e81","user":{"login":"concierge","id":18560428,"avatar_url":"https://avatars.githubusercontent.com/u/18560428?v=3","gravatar_id":"","url":"https://api.github.com/users/concierge","html_url":"https://github.com/concierge","followers_url":"https://api.github.com/users/concierge/followers","following_url":"https://api.github.com/users/concierge/following{/other_user}","gists_url":"https://api.github.com/users/concierge/gists{/gist_id}","starred_url":"https://api.github.com/users/concierge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concierge/subscriptions","organizations_url":"https://api.github.com/users/concierge/orgs","repos_url":"https://api.github.com/users/concierge/repos","events_url":"https://api.github.com/users/concierge/events{/privacy}","received_events_url":"https://api.github.com/users/concierge/received_events","type":"Organization","site_admin":false},"repo":{"id":39051419,"name":"Concierge","full_name":"concierge/Concierge","owner":{"login":"concierge","id":18560428,"avatar_url":"https://avatars.githubusercontent.com/u/18560428?v=3","gravatar_id":"","url":"https://api.github.com/users/concierge","html_url":"https://github.com/concierge","followers_url":"https://api.github.com/users/concierge/followers","following_url":"https://api.github.com/users/concierge/following{/other_user}","gists_url":"https://api.github.com/users/concierge/gists{/gist_id}","starred_url":"https://api.github.com/users/concierge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concierge/subscriptions","organizations_url":"https://api.github.com/users/concierge/orgs","repos_url":"https://api.github.com/users/concierge/repos","events_url":"https://api.github.com/users/concierge/events{/privacy}","received_events_url":"https://api.github.com/users/concierge/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/concierge/Concierge","description":"Modular chat bot. (Karma + Sassy) * (Facebook + Slack) - Hipchat = Kassy","fork":false,"url":"https://api.github.com/repos/concierge/Concierge","forks_url":"https://api.github.com/repos/concierge/Concierge/forks","keys_url":"https://api.github.com/repos/concierge/Concierge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/concierge/Concierge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/concierge/Concierge/teams","hooks_url":"https://api.github.com/repos/concierge/Concierge/hooks","issue_events_url":"https://api.github.com/repos/concierge/Concierge/issues/events{/number}","events_url":"https://api.github.com/repos/concierge/Concierge/events","assignees_url":"https://api.github.com/repos/concierge/Concierge/assignees{/user}","branches_url":"https://api.github.com/repos/concierge/Concierge/branches{/branch}","tags_url":"https://api.github.com/repos/concierge/Concierge/tags","blobs_url":"https://api.github.com/repos/concierge/Concierge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/concierge/Concierge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/concierge/Concierge/git/refs{/sha}","trees_url":"https://api.github.com/repos/concierge/Concierge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/concierge/Concierge/statuses/{sha}","languages_url":"https://api.github.com/repos/concierge/Concierge/languages","stargazers_url":"https://api.github.com/repos/concierge/Concierge/stargazers","contributors_url":"https://api.github.com/repos/concierge/Concierge/contributors","subscribers_url":"https://api.github.com/repos/concierge/Concierge/subscribers","subscription_url":"https://api.github.com/repos/concierge/Concierge/subscription","commits_url":"https://api.github.com/repos/concierge/Concierge/commits{/sha}","git_commits_url":"https://api.github.com/repos/concierge/Concierge/git/commits{/sha}","comments_url":"https://api.github.com/repos/concierge/Concierge/comments{/number}","issue_comment_url":"https://api.github.com/repos/concierge/Concierge/issues/comments{/number}","contents_url":"https://api.github.com/repos/concierge/Concierge/contents/{+path}","compare_url":"https://api.github.com/repos/concierge/Concierge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/concierge/Concierge/merges","archive_url":"https://api.github.com/repos/concierge/Concierge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/concierge/Concierge/downloads","issues_url":"https://api.github.com/repos/concierge/Concierge/issues{/number}","pulls_url":"https://api.github.com/repos/concierge/Concierge/pulls{/number}","milestones_url":"https://api.github.com/repos/concierge/Concierge/milestones{/number}","notifications_url":"https://api.github.com/repos/concierge/Concierge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/concierge/Concierge/labels{/name}","releases_url":"https://api.github.com/repos/concierge/Concierge/releases{/id}","deployments_url":"https://api.github.com/repos/concierge/Concierge/deployments","created_at":"2015-07-14T03:27:54Z","updated_at":"2016-09-02T19:20:50Z","pushed_at":"2016-09-03T03:16:56Z","git_url":"git://github.com/concierge/Concierge.git","ssh_url":"git@github.com:concierge/Concierge.git","clone_url":"https://github.com/concierge/Concierge.git","svn_url":"https://github.com/concierge/Concierge","homepage":"","size":4991,"stargazers_count":68,"watchers_count":68,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":19,"forks":24,"open_issues":19,"watchers":68,"default_branch":"master"}},"base":{"label":"concierge:master","ref":"master","sha":"ba1383eb106cf164fe96c97e4e08a1b0ab8e1688","user":{"login":"concierge","id":18560428,"avatar_url":"https://avatars.githubusercontent.com/u/18560428?v=3","gravatar_id":"","url":"https://api.github.com/users/concierge","html_url":"https://github.com/concierge","followers_url":"https://api.github.com/users/concierge/followers","following_url":"https://api.github.com/users/concierge/following{/other_user}","gists_url":"https://api.github.com/users/concierge/gists{/gist_id}","starred_url":"https://api.github.com/users/concierge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concierge/subscriptions","organizations_url":"https://api.github.com/users/concierge/orgs","repos_url":"https://api.github.com/users/concierge/repos","events_url":"https://api.github.com/users/concierge/events{/privacy}","received_events_url":"https://api.github.com/users/concierge/received_events","type":"Organization","site_admin":false},"repo":{"id":39051419,"name":"Concierge","full_name":"concierge/Concierge","owner":{"login":"concierge","id":18560428,"avatar_url":"https://avatars.githubusercontent.com/u/18560428?v=3","gravatar_id":"","url":"https://api.github.com/users/concierge","html_url":"https://github.com/concierge","followers_url":"https://api.github.com/users/concierge/followers","following_url":"https://api.github.com/users/concierge/following{/other_user}","gists_url":"https://api.github.com/users/concierge/gists{/gist_id}","starred_url":"https://api.github.com/users/concierge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concierge/subscriptions","organizations_url":"https://api.github.com/users/concierge/orgs","repos_url":"https://api.github.com/users/concierge/repos","events_url":"https://api.github.com/users/concierge/events{/privacy}","received_events_url":"https://api.github.com/users/concierge/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/concierge/Concierge","description":"Modular chat bot. (Karma + Sassy) * (Facebook + Slack) - Hipchat = Kassy","fork":false,"url":"https://api.github.com/repos/concierge/Concierge","forks_url":"https://api.github.com/repos/concierge/Concierge/forks","keys_url":"https://api.github.com/repos/concierge/Concierge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/concierge/Concierge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/concierge/Concierge/teams","hooks_url":"https://api.github.com/repos/concierge/Concierge/hooks","issue_events_url":"https://api.github.com/repos/concierge/Concierge/issues/events{/number}","events_url":"https://api.github.com/repos/concierge/Concierge/events","assignees_url":"https://api.github.com/repos/concierge/Concierge/assignees{/user}","branches_url":"https://api.github.com/repos/concierge/Concierge/branches{/branch}","tags_url":"https://api.github.com/repos/concierge/Concierge/tags","blobs_url":"https://api.github.com/repos/concierge/Concierge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/concierge/Concierge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/concierge/Concierge/git/refs{/sha}","trees_url":"https://api.github.com/repos/concierge/Concierge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/concierge/Concierge/statuses/{sha}","languages_url":"https://api.github.com/repos/concierge/Concierge/languages","stargazers_url":"https://api.github.com/repos/concierge/Concierge/stargazers","contributors_url":"https://api.github.com/repos/concierge/Concierge/contributors","subscribers_url":"https://api.github.com/repos/concierge/Concierge/subscribers","subscription_url":"https://api.github.com/repos/concierge/Concierge/subscription","commits_url":"https://api.github.com/repos/concierge/Concierge/commits{/sha}","git_commits_url":"https://api.github.com/repos/concierge/Concierge/git/commits{/sha}","comments_url":"https://api.github.com/repos/concierge/Concierge/comments{/number}","issue_comment_url":"https://api.github.com/repos/concierge/Concierge/issues/comments{/number}","contents_url":"https://api.github.com/repos/concierge/Concierge/contents/{+path}","compare_url":"https://api.github.com/repos/concierge/Concierge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/concierge/Concierge/merges","archive_url":"https://api.github.com/repos/concierge/Concierge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/concierge/Concierge/downloads","issues_url":"https://api.github.com/repos/concierge/Concierge/issues{/number}","pulls_url":"https://api.github.com/repos/concierge/Concierge/pulls{/number}","milestones_url":"https://api.github.com/repos/concierge/Concierge/milestones{/number}","notifications_url":"https://api.github.com/repos/concierge/Concierge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/concierge/Concierge/labels{/name}","releases_url":"https://api.github.com/repos/concierge/Concierge/releases{/id}","deployments_url":"https://api.github.com/repos/concierge/Concierge/deployments","created_at":"2015-07-14T03:27:54Z","updated_at":"2016-09-02T19:20:50Z","pushed_at":"2016-09-03T03:16:56Z","git_url":"git://github.com/concierge/Concierge.git","ssh_url":"git@github.com:concierge/Concierge.git","clone_url":"https://github.com/concierge/Concierge.git","svn_url":"https://github.com/concierge/Concierge","homepage":"","size":4991,"stargazers_count":68,"watchers_count":68,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":19,"forks":24,"open_issues":19,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/concierge/Concierge/pulls/209"},"html":{"href":"https://github.com/concierge/Concierge/pull/209"},"issue":{"href":"https://api.github.com/repos/concierge/Concierge/issues/209"},"comments":{"href":"https://api.github.com/repos/concierge/Concierge/issues/209/comments"},"review_comments":{"href":"https://api.github.com/repos/concierge/Concierge/pulls/209/comments"},"review_comment":{"href":"https://api.github.com/repos/concierge/Concierge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/concierge/Concierge/pulls/209/commits"},"statuses":{"href":"https://api.github.com/repos/concierge/Concierge/statuses/c47b84d8bf37b322ce3f46349274c4d756ce0e81"}}}}
{"actor":{"display_login":"codacy-bot"}}