{"action":"opened","number":39,"pull_request":{"url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/pulls/39","id":57029737,"html_url":"https://github.com/BlakeWilliams/Elixir-Slack/pull/39","diff_url":"https://github.com/BlakeWilliams/Elixir-Slack/pull/39.diff","patch_url":"https://github.com/BlakeWilliams/Elixir-Slack/pull/39.patch","issue_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/issues/39","number":39,"state":"open","locked":false,"title":"Ensure members is updated when joining a channel","user":{"login":"DylanGriffith","id":1002737,"avatar_url":"https://avatars.githubusercontent.com/u/1002737?v=3","gravatar_id":"","url":"https://api.github.com/users/DylanGriffith","html_url":"https://github.com/DylanGriffith","followers_url":"https://api.github.com/users/DylanGriffith/followers","following_url":"https://api.github.com/users/DylanGriffith/following{/other_user}","gists_url":"https://api.github.com/users/DylanGriffith/gists{/gist_id}","starred_url":"https://api.github.com/users/DylanGriffith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DylanGriffith/subscriptions","organizations_url":"https://api.github.com/users/DylanGriffith/orgs","repos_url":"https://api.github.com/users/DylanGriffith/repos","events_url":"https://api.github.com/users/DylanGriffith/events{/privacy}","received_events_url":"https://api.github.com/users/DylanGriffith/received_events","type":"User","site_admin":false},"body":"So it would appear that the members section is blank before joining a channel so if the bot joins the channel after being started it won't have anything in the `members` key. This appears to fix the problem by just making sure the `members` key is replaced with the latest `members` `channel_joined`.","created_at":"2016-01-25T05:17:32Z","updated_at":"2016-01-25T05:17:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40235edd5daca1278dfdf3581c1e34498c90bc6c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/pulls/39/commits","review_comments_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/pulls/39/comments","review_comment_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/issues/39/comments","statuses_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/statuses/496f8b54159267f26299b61c9b6790cc078bca33","head":{"label":"DylanGriffith:patch-1","ref":"patch-1","sha":"496f8b54159267f26299b61c9b6790cc078bca33","user":{"login":"DylanGriffith","id":1002737,"avatar_url":"https://avatars.githubusercontent.com/u/1002737?v=3","gravatar_id":"","url":"https://api.github.com/users/DylanGriffith","html_url":"https://github.com/DylanGriffith","followers_url":"https://api.github.com/users/DylanGriffith/followers","following_url":"https://api.github.com/users/DylanGriffith/following{/other_user}","gists_url":"https://api.github.com/users/DylanGriffith/gists{/gist_id}","starred_url":"https://api.github.com/users/DylanGriffith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DylanGriffith/subscriptions","organizations_url":"https://api.github.com/users/DylanGriffith/orgs","repos_url":"https://api.github.com/users/DylanGriffith/repos","events_url":"https://api.github.com/users/DylanGriffith/events{/privacy}","received_events_url":"https://api.github.com/users/DylanGriffith/received_events","type":"User","site_admin":false},"repo":{"id":50327784,"name":"Elixir-Slack","full_name":"DylanGriffith/Elixir-Slack","owner":{"login":"DylanGriffith","id":1002737,"avatar_url":"https://avatars.githubusercontent.com/u/1002737?v=3","gravatar_id":"","url":"https://api.github.com/users/DylanGriffith","html_url":"https://github.com/DylanGriffith","followers_url":"https://api.github.com/users/DylanGriffith/followers","following_url":"https://api.github.com/users/DylanGriffith/following{/other_user}","gists_url":"https://api.github.com/users/DylanGriffith/gists{/gist_id}","starred_url":"https://api.github.com/users/DylanGriffith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DylanGriffith/subscriptions","organizations_url":"https://api.github.com/users/DylanGriffith/orgs","repos_url":"https://api.github.com/users/DylanGriffith/repos","events_url":"https://api.github.com/users/DylanGriffith/events{/privacy}","received_events_url":"https://api.github.com/users/DylanGriffith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DylanGriffith/Elixir-Slack","description":"Slack real time messaging client in Elixir","fork":true,"url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack","forks_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/forks","keys_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/teams","hooks_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/hooks","issue_events_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/issues/events{/number}","events_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/events","assignees_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/assignees{/user}","branches_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/branches{/branch}","tags_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/tags","blobs_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/git/refs{/sha}","trees_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/statuses/{sha}","languages_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/languages","stargazers_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/stargazers","contributors_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/contributors","subscribers_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/subscribers","subscription_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/subscription","commits_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/commits{/sha}","git_commits_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/git/commits{/sha}","comments_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/comments{/number}","issue_comment_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/issues/comments{/number}","contents_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/contents/{+path}","compare_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/merges","archive_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/downloads","issues_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/issues{/number}","pulls_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/pulls{/number}","milestones_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/milestones{/number}","notifications_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/labels{/name}","releases_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/releases{/id}","deployments_url":"https://api.github.com/repos/DylanGriffith/Elixir-Slack/deployments","created_at":"2016-01-25T05:14:43Z","updated_at":"2016-01-25T05:14:44Z","pushed_at":"2016-01-25T05:17:24Z","git_url":"git://github.com/DylanGriffith/Elixir-Slack.git","ssh_url":"git@github.com:DylanGriffith/Elixir-Slack.git","clone_url":"https://github.com/DylanGriffith/Elixir-Slack.git","svn_url":"https://github.com/DylanGriffith/Elixir-Slack","homepage":"","size":46,"stargazers_count":0,"watchers_count":0,"language":"Elixir","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":"master"}},"base":{"label":"BlakeWilliams:master","ref":"master","sha":"e5b1286dcdc17cc10faab66d9783b0802ce5eb4b","user":{"login":"BlakeWilliams","id":342554,"avatar_url":"https://avatars.githubusercontent.com/u/342554?v=3","gravatar_id":"","url":"https://api.github.com/users/BlakeWilliams","html_url":"https://github.com/BlakeWilliams","followers_url":"https://api.github.com/users/BlakeWilliams/followers","following_url":"https://api.github.com/users/BlakeWilliams/following{/other_user}","gists_url":"https://api.github.com/users/BlakeWilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/BlakeWilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BlakeWilliams/subscriptions","organizations_url":"https://api.github.com/users/BlakeWilliams/orgs","repos_url":"https://api.github.com/users/BlakeWilliams/repos","events_url":"https://api.github.com/users/BlakeWilliams/events{/privacy}","received_events_url":"https://api.github.com/users/BlakeWilliams/received_events","type":"User","site_admin":false},"repo":{"id":28551492,"name":"Elixir-Slack","full_name":"BlakeWilliams/Elixir-Slack","owner":{"login":"BlakeWilliams","id":342554,"avatar_url":"https://avatars.githubusercontent.com/u/342554?v=3","gravatar_id":"","url":"https://api.github.com/users/BlakeWilliams","html_url":"https://github.com/BlakeWilliams","followers_url":"https://api.github.com/users/BlakeWilliams/followers","following_url":"https://api.github.com/users/BlakeWilliams/following{/other_user}","gists_url":"https://api.github.com/users/BlakeWilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/BlakeWilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BlakeWilliams/subscriptions","organizations_url":"https://api.github.com/users/BlakeWilliams/orgs","repos_url":"https://api.github.com/users/BlakeWilliams/repos","events_url":"https://api.github.com/users/BlakeWilliams/events{/privacy}","received_events_url":"https://api.github.com/users/BlakeWilliams/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BlakeWilliams/Elixir-Slack","description":"Slack real time messaging client in Elixir","fork":false,"url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack","forks_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/forks","keys_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/teams","hooks_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/hooks","issue_events_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/issues/events{/number}","events_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/events","assignees_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/assignees{/user}","branches_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/branches{/branch}","tags_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/tags","blobs_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/git/refs{/sha}","trees_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/statuses/{sha}","languages_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/languages","stargazers_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/stargazers","contributors_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/contributors","subscribers_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/subscribers","subscription_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/subscription","commits_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/commits{/sha}","git_commits_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/git/commits{/sha}","comments_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/comments{/number}","issue_comment_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/issues/comments{/number}","contents_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/contents/{+path}","compare_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/merges","archive_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/downloads","issues_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/issues{/number}","pulls_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/pulls{/number}","milestones_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/milestones{/number}","notifications_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/labels{/name}","releases_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/releases{/id}","deployments_url":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/deployments","created_at":"2014-12-28T02:26:05Z","updated_at":"2016-01-25T05:10:10Z","pushed_at":"2016-01-25T05:17:32Z","git_url":"git://github.com/BlakeWilliams/Elixir-Slack.git","ssh_url":"git@github.com:BlakeWilliams/Elixir-Slack.git","clone_url":"https://github.com/BlakeWilliams/Elixir-Slack.git","svn_url":"https://github.com/BlakeWilliams/Elixir-Slack","homepage":"","size":59,"stargazers_count":99,"watchers_count":99,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":5,"forks":19,"open_issues":5,"watchers":99,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/pulls/39"},"html":{"href":"https://github.com/BlakeWilliams/Elixir-Slack/pull/39"},"issue":{"href":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/issues/39"},"comments":{"href":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/BlakeWilliams/Elixir-Slack/statuses/496f8b54159267f26299b61c9b6790cc078bca33"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":0,"changed_files":1}}