{"action":"opened","number":36,"pull_request":{"url":"https://api.github.com/repos/devinleonhart/wordsmith/pulls/36","id":66405458,"html_url":"https://github.com/devinleonhart/wordsmith/pull/36","diff_url":"https://github.com/devinleonhart/wordsmith/pull/36.diff","patch_url":"https://github.com/devinleonhart/wordsmith/pull/36.patch","issue_url":"https://api.github.com/repos/devinleonhart/wordsmith/issues/36","number":36,"state":"open","locked":false,"title":"Store Chat messages with unique Firebase IDs","user":{"login":"starim","id":809021,"avatar_url":"https://avatars.githubusercontent.com/u/809021?v=3","gravatar_id":"","url":"https://api.github.com/users/starim","html_url":"https://github.com/starim","followers_url":"https://api.github.com/users/starim/followers","following_url":"https://api.github.com/users/starim/following{/other_user}","gists_url":"https://api.github.com/users/starim/gists{/gist_id}","starred_url":"https://api.github.com/users/starim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starim/subscriptions","organizations_url":"https://api.github.com/users/starim/orgs","repos_url":"https://api.github.com/users/starim/repos","events_url":"https://api.github.com/users/starim/events{/privacy}","received_events_url":"https://api.github.com/users/starim/received_events","type":"User","site_admin":false},"body":"@devinleonhart\r\n\r\nPreviously chat messages were stored as an array, with each message\r\ngiven an integer key. However, this is not the preferred way to store\r\ndata in Firebase and allows race conditions where a chat message can be\r\noverwritten and lost if two messages are sent near-simultaneously. This\r\ncommit modifies the ChatWindow to use Firebase's push API to generate\r\nunique, sequential IDs for every message, eliminating the race\r\nconditions present in the chat system.\r\n\r\nIn addition, the ChatWindow integration tests were expanded to include\r\nchat messages submitted to Firebase directly, simulating chat messages\r\ncoming in from other clients. This allows testing that the ChatWindow\r\ncorrectly displays messages from other users.\r\n\r\nNOTE: This update introduces a problem I don't know how to solve--how to\r\nupdate the Firebase seed with valid unique IDs for its chat messages.","created_at":"2016-04-13T22:59:35Z","updated_at":"2016-04-13T22:59:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"devinleonhart","id":2824816,"avatar_url":"https://avatars.githubusercontent.com/u/2824816?v=3","gravatar_id":"","url":"https://api.github.com/users/devinleonhart","html_url":"https://github.com/devinleonhart","followers_url":"https://api.github.com/users/devinleonhart/followers","following_url":"https://api.github.com/users/devinleonhart/following{/other_user}","gists_url":"https://api.github.com/users/devinleonhart/gists{/gist_id}","starred_url":"https://api.github.com/users/devinleonhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devinleonhart/subscriptions","organizations_url":"https://api.github.com/users/devinleonhart/orgs","repos_url":"https://api.github.com/users/devinleonhart/repos","events_url":"https://api.github.com/users/devinleonhart/events{/privacy}","received_events_url":"https://api.github.com/users/devinleonhart/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/devinleonhart/wordsmith/pulls/36/commits","review_comments_url":"https://api.github.com/repos/devinleonhart/wordsmith/pulls/36/comments","review_comment_url":"https://api.github.com/repos/devinleonhart/wordsmith/pulls/comments{/number}","comments_url":"https://api.github.com/repos/devinleonhart/wordsmith/issues/36/comments","statuses_url":"https://api.github.com/repos/devinleonhart/wordsmith/statuses/fd80b5a2bc2aedeced775cf30e5435b7c8441207","head":{"label":"devinleonhart:fix-chat-indices","ref":"fix-chat-indices","sha":"fd80b5a2bc2aedeced775cf30e5435b7c8441207","user":{"login":"devinleonhart","id":2824816,"avatar_url":"https://avatars.githubusercontent.com/u/2824816?v=3","gravatar_id":"","url":"https://api.github.com/users/devinleonhart","html_url":"https://github.com/devinleonhart","followers_url":"https://api.github.com/users/devinleonhart/followers","following_url":"https://api.github.com/users/devinleonhart/following{/other_user}","gists_url":"https://api.github.com/users/devinleonhart/gists{/gist_id}","starred_url":"https://api.github.com/users/devinleonhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devinleonhart/subscriptions","organizations_url":"https://api.github.com/users/devinleonhart/orgs","repos_url":"https://api.github.com/users/devinleonhart/repos","events_url":"https://api.github.com/users/devinleonhart/events{/privacy}","received_events_url":"https://api.github.com/users/devinleonhart/received_events","type":"User","site_admin":false},"repo":{"id":41934533,"name":"wordsmith","full_name":"devinleonhart/wordsmith","owner":{"login":"devinleonhart","id":2824816,"avatar_url":"https://avatars.githubusercontent.com/u/2824816?v=3","gravatar_id":"","url":"https://api.github.com/users/devinleonhart","html_url":"https://github.com/devinleonhart","followers_url":"https://api.github.com/users/devinleonhart/followers","following_url":"https://api.github.com/users/devinleonhart/following{/other_user}","gists_url":"https://api.github.com/users/devinleonhart/gists{/gist_id}","starred_url":"https://api.github.com/users/devinleonhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devinleonhart/subscriptions","organizations_url":"https://api.github.com/users/devinleonhart/orgs","repos_url":"https://api.github.com/users/devinleonhart/repos","events_url":"https://api.github.com/users/devinleonhart/events{/privacy}","received_events_url":"https://api.github.com/users/devinleonhart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/devinleonhart/wordsmith","description":"A ReactJS webapp that allows for asynchronous play of the Wordsmith game.","fork":false,"url":"https://api.github.com/repos/devinleonhart/wordsmith","forks_url":"https://api.github.com/repos/devinleonhart/wordsmith/forks","keys_url":"https://api.github.com/repos/devinleonhart/wordsmith/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devinleonhart/wordsmith/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devinleonhart/wordsmith/teams","hooks_url":"https://api.github.com/repos/devinleonhart/wordsmith/hooks","issue_events_url":"https://api.github.com/repos/devinleonhart/wordsmith/issues/events{/number}","events_url":"https://api.github.com/repos/devinleonhart/wordsmith/events","assignees_url":"https://api.github.com/repos/devinleonhart/wordsmith/assignees{/user}","branches_url":"https://api.github.com/repos/devinleonhart/wordsmith/branches{/branch}","tags_url":"https://api.github.com/repos/devinleonhart/wordsmith/tags","blobs_url":"https://api.github.com/repos/devinleonhart/wordsmith/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devinleonhart/wordsmith/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devinleonhart/wordsmith/git/refs{/sha}","trees_url":"https://api.github.com/repos/devinleonhart/wordsmith/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devinleonhart/wordsmith/statuses/{sha}","languages_url":"https://api.github.com/repos/devinleonhart/wordsmith/languages","stargazers_url":"https://api.github.com/repos/devinleonhart/wordsmith/stargazers","contributors_url":"https://api.github.com/repos/devinleonhart/wordsmith/contributors","subscribers_url":"https://api.github.com/repos/devinleonhart/wordsmith/subscribers","subscription_url":"https://api.github.com/repos/devinleonhart/wordsmith/subscription","commits_url":"https://api.github.com/repos/devinleonhart/wordsmith/commits{/sha}","git_commits_url":"https://api.github.com/repos/devinleonhart/wordsmith/git/commits{/sha}","comments_url":"https://api.github.com/repos/devinleonhart/wordsmith/comments{/number}","issue_comment_url":"https://api.github.com/repos/devinleonhart/wordsmith/issues/comments{/number}","contents_url":"https://api.github.com/repos/devinleonhart/wordsmith/contents/{+path}","compare_url":"https://api.github.com/repos/devinleonhart/wordsmith/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devinleonhart/wordsmith/merges","archive_url":"https://api.github.com/repos/devinleonhart/wordsmith/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devinleonhart/wordsmith/downloads","issues_url":"https://api.github.com/repos/devinleonhart/wordsmith/issues{/number}","pulls_url":"https://api.github.com/repos/devinleonhart/wordsmith/pulls{/number}","milestones_url":"https://api.github.com/repos/devinleonhart/wordsmith/milestones{/number}","notifications_url":"https://api.github.com/repos/devinleonhart/wordsmith/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devinleonhart/wordsmith/labels{/name}","releases_url":"https://api.github.com/repos/devinleonhart/wordsmith/releases{/id}","deployments_url":"https://api.github.com/repos/devinleonhart/wordsmith/deployments","created_at":"2015-09-04T19:38:27Z","updated_at":"2016-03-27T03:11:42Z","pushed_at":"2016-04-13T22:58:37Z","git_url":"git://github.com/devinleonhart/wordsmith.git","ssh_url":"git@github.com:devinleonhart/wordsmith.git","clone_url":"https://github.com/devinleonhart/wordsmith.git","svn_url":"https://github.com/devinleonhart/wordsmith","homepage":"","size":2742,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":0,"default_branch":"master"}},"base":{"label":"devinleonhart:feature-chat","ref":"feature-chat","sha":"5cc3be1b5ad1f20779bca683d52f0e72bd0c8431","user":{"login":"devinleonhart","id":2824816,"avatar_url":"https://avatars.githubusercontent.com/u/2824816?v=3","gravatar_id":"","url":"https://api.github.com/users/devinleonhart","html_url":"https://github.com/devinleonhart","followers_url":"https://api.github.com/users/devinleonhart/followers","following_url":"https://api.github.com/users/devinleonhart/following{/other_user}","gists_url":"https://api.github.com/users/devinleonhart/gists{/gist_id}","starred_url":"https://api.github.com/users/devinleonhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devinleonhart/subscriptions","organizations_url":"https://api.github.com/users/devinleonhart/orgs","repos_url":"https://api.github.com/users/devinleonhart/repos","events_url":"https://api.github.com/users/devinleonhart/events{/privacy}","received_events_url":"https://api.github.com/users/devinleonhart/received_events","type":"User","site_admin":false},"repo":{"id":41934533,"name":"wordsmith","full_name":"devinleonhart/wordsmith","owner":{"login":"devinleonhart","id":2824816,"avatar_url":"https://avatars.githubusercontent.com/u/2824816?v=3","gravatar_id":"","url":"https://api.github.com/users/devinleonhart","html_url":"https://github.com/devinleonhart","followers_url":"https://api.github.com/users/devinleonhart/followers","following_url":"https://api.github.com/users/devinleonhart/following{/other_user}","gists_url":"https://api.github.com/users/devinleonhart/gists{/gist_id}","starred_url":"https://api.github.com/users/devinleonhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devinleonhart/subscriptions","organizations_url":"https://api.github.com/users/devinleonhart/orgs","repos_url":"https://api.github.com/users/devinleonhart/repos","events_url":"https://api.github.com/users/devinleonhart/events{/privacy}","received_events_url":"https://api.github.com/users/devinleonhart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/devinleonhart/wordsmith","description":"A ReactJS webapp that allows for asynchronous play of the Wordsmith game.","fork":false,"url":"https://api.github.com/repos/devinleonhart/wordsmith","forks_url":"https://api.github.com/repos/devinleonhart/wordsmith/forks","keys_url":"https://api.github.com/repos/devinleonhart/wordsmith/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devinleonhart/wordsmith/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devinleonhart/wordsmith/teams","hooks_url":"https://api.github.com/repos/devinleonhart/wordsmith/hooks","issue_events_url":"https://api.github.com/repos/devinleonhart/wordsmith/issues/events{/number}","events_url":"https://api.github.com/repos/devinleonhart/wordsmith/events","assignees_url":"https://api.github.com/repos/devinleonhart/wordsmith/assignees{/user}","branches_url":"https://api.github.com/repos/devinleonhart/wordsmith/branches{/branch}","tags_url":"https://api.github.com/repos/devinleonhart/wordsmith/tags","blobs_url":"https://api.github.com/repos/devinleonhart/wordsmith/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devinleonhart/wordsmith/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devinleonhart/wordsmith/git/refs{/sha}","trees_url":"https://api.github.com/repos/devinleonhart/wordsmith/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devinleonhart/wordsmith/statuses/{sha}","languages_url":"https://api.github.com/repos/devinleonhart/wordsmith/languages","stargazers_url":"https://api.github.com/repos/devinleonhart/wordsmith/stargazers","contributors_url":"https://api.github.com/repos/devinleonhart/wordsmith/contributors","subscribers_url":"https://api.github.com/repos/devinleonhart/wordsmith/subscribers","subscription_url":"https://api.github.com/repos/devinleonhart/wordsmith/subscription","commits_url":"https://api.github.com/repos/devinleonhart/wordsmith/commits{/sha}","git_commits_url":"https://api.github.com/repos/devinleonhart/wordsmith/git/commits{/sha}","comments_url":"https://api.github.com/repos/devinleonhart/wordsmith/comments{/number}","issue_comment_url":"https://api.github.com/repos/devinleonhart/wordsmith/issues/comments{/number}","contents_url":"https://api.github.com/repos/devinleonhart/wordsmith/contents/{+path}","compare_url":"https://api.github.com/repos/devinleonhart/wordsmith/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devinleonhart/wordsmith/merges","archive_url":"https://api.github.com/repos/devinleonhart/wordsmith/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devinleonhart/wordsmith/downloads","issues_url":"https://api.github.com/repos/devinleonhart/wordsmith/issues{/number}","pulls_url":"https://api.github.com/repos/devinleonhart/wordsmith/pulls{/number}","milestones_url":"https://api.github.com/repos/devinleonhart/wordsmith/milestones{/number}","notifications_url":"https://api.github.com/repos/devinleonhart/wordsmith/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devinleonhart/wordsmith/labels{/name}","releases_url":"https://api.github.com/repos/devinleonhart/wordsmith/releases{/id}","deployments_url":"https://api.github.com/repos/devinleonhart/wordsmith/deployments","created_at":"2015-09-04T19:38:27Z","updated_at":"2016-03-27T03:11:42Z","pushed_at":"2016-04-13T22:58:37Z","git_url":"git://github.com/devinleonhart/wordsmith.git","ssh_url":"git@github.com:devinleonhart/wordsmith.git","clone_url":"https://github.com/devinleonhart/wordsmith.git","svn_url":"https://github.com/devinleonhart/wordsmith","homepage":"","size":2742,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/devinleonhart/wordsmith/pulls/36"},"html":{"href":"https://github.com/devinleonhart/wordsmith/pull/36"},"issue":{"href":"https://api.github.com/repos/devinleonhart/wordsmith/issues/36"},"comments":{"href":"https://api.github.com/repos/devinleonhart/wordsmith/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/devinleonhart/wordsmith/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/devinleonhart/wordsmith/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/devinleonhart/wordsmith/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/devinleonhart/wordsmith/statuses/fd80b5a2bc2aedeced775cf30e5435b7c8441207"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":42,"deletions":13,"changed_files":2}}