{"action":"created","comment":{"url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls/comments/139034478","pull_request_review_id":62913354,"id":139034478,"diff_hunk":"@@ -0,0 +1,62 @@\n+---\n+title: Elixir Girls Guides Slackir App retrieving data\n+---\n+\n+<%= partial \"partials/guides-nav\" %>\n+\n+<div id=\"wrapper\">\n+\n+        <!-- Navigation -->\n+        <%= partial \"partials/guides-sidebar-nav\" %>\n+\n+        <div id=\"page-wrapper\">\n+          <h1>Retrieving from database</h1>\n+            <p>Everytime when you refresh your page, you lose the message history and that is not ideal. </p>\n+            <p>We have all these stored messages in our database and we want to retrieve it when someone logs in. Therefore, we will need to retrieve these messages and display them.</p>\n+            <h2>Perform a callback after join</h2>\n+            <p>Go to the <bold>join</bold> function, and add the line just below <bold>if authorized?(payload) do</bold></p>\n+            <p>We are going to send a message containg our self PID(Process Identifier) as the first parameter. The second parameter is a message to run a function called <em> after_join </em>. This function is identified by an atom type.</p>\n+\n+            <% code(\"elixir\") do %>\n+            def join(\"random:lobby\", payload, socket) do\n+                if authorized?(payload) do\n+                  send self(), :after_join #<-- Add this line\n+\n+            <% end %>\n+\n+          <h4>What does send do?</h4>\n+          <p><em>send</em> manually sends a message <em>:after_join</em> with it's PID generated by the function <em>self()</em>. We want to be able to run the after join task asynchronously. Lets look at how we should receive the :after_join message</p>\n+          <h1>Handling a message in a callback</h1>\n+          <p></p>\n+          <% code(\"elixir\") do %>","path":"source/guide1.html","position":31,"original_position":31,"commit_id":"a88ed5a3db75f6257261dc707b3bca48556180f7","original_commit_id":"a88ed5a3db75f6257261dc707b3bca48556180f7","user":{"login":"brentonannan","id":3326773,"avatar_url":"https://avatars2.githubusercontent.com/u/3326773?v=4","gravatar_id":"","url":"https://api.github.com/users/brentonannan","html_url":"https://github.com/brentonannan","followers_url":"https://api.github.com/users/brentonannan/followers","following_url":"https://api.github.com/users/brentonannan/following{/other_user}","gists_url":"https://api.github.com/users/brentonannan/gists{/gist_id}","starred_url":"https://api.github.com/users/brentonannan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentonannan/subscriptions","organizations_url":"https://api.github.com/users/brentonannan/orgs","repos_url":"https://api.github.com/users/brentonannan/repos","events_url":"https://api.github.com/users/brentonannan/events{/privacy}","received_events_url":"https://api.github.com/users/brentonannan/received_events","type":"User","site_admin":false},"body":"I *so* wish I'd known about this helper sooner.","created_at":"2017-09-14T23:26:12Z","updated_at":"2017-09-14T23:27:31Z","html_url":"https://github.com/Elixir-Girls/elixir-girls.github.io/pull/45#discussion_r139034478","pull_request_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls/45","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls/comments/139034478"},"html":{"href":"https://github.com/Elixir-Girls/elixir-girls.github.io/pull/45#discussion_r139034478"},"pull_request":{"href":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls/45","id":141058027,"html_url":"https://github.com/Elixir-Girls/elixir-girls.github.io/pull/45","diff_url":"https://github.com/Elixir-Girls/elixir-girls.github.io/pull/45.diff","patch_url":"https://github.com/Elixir-Girls/elixir-girls.github.io/pull/45.patch","issue_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/issues/45","number":45,"state":"open","locked":false,"title":"[WIP] Retrieve messages guide","user":{"login":"daphsta","id":2336267,"avatar_url":"https://avatars3.githubusercontent.com/u/2336267?v=4","gravatar_id":"","url":"https://api.github.com/users/daphsta","html_url":"https://github.com/daphsta","followers_url":"https://api.github.com/users/daphsta/followers","following_url":"https://api.github.com/users/daphsta/following{/other_user}","gists_url":"https://api.github.com/users/daphsta/gists{/gist_id}","starred_url":"https://api.github.com/users/daphsta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daphsta/subscriptions","organizations_url":"https://api.github.com/users/daphsta/orgs","repos_url":"https://api.github.com/users/daphsta/repos","events_url":"https://api.github.com/users/daphsta/events{/privacy}","received_events_url":"https://api.github.com/users/daphsta/received_events","type":"User","site_admin":false},"body":"This is an additional guide to add on extra functionality to the current app.\r\nAppreciate a review on this :) ","created_at":"2017-09-14T12:17:07Z","updated_at":"2017-09-14T23:27:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bc3cf6ce248adb23330ccd17d92a1bfa13b14cc","assignee":null,"assignees":[],"requested_reviewers":[{"login":"catherine-jones","id":5628393,"avatar_url":"https://avatars0.githubusercontent.com/u/5628393?v=4","gravatar_id":"","url":"https://api.github.com/users/catherine-jones","html_url":"https://github.com/catherine-jones","followers_url":"https://api.github.com/users/catherine-jones/followers","following_url":"https://api.github.com/users/catherine-jones/following{/other_user}","gists_url":"https://api.github.com/users/catherine-jones/gists{/gist_id}","starred_url":"https://api.github.com/users/catherine-jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catherine-jones/subscriptions","organizations_url":"https://api.github.com/users/catherine-jones/orgs","repos_url":"https://api.github.com/users/catherine-jones/repos","events_url":"https://api.github.com/users/catherine-jones/events{/privacy}","received_events_url":"https://api.github.com/users/catherine-jones/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls/45/commits","review_comments_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls/45/comments","review_comment_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/issues/45/comments","statuses_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/statuses/a88ed5a3db75f6257261dc707b3bca48556180f7","head":{"label":"Elixir-Girls:feature/retrieve-messages","ref":"feature/retrieve-messages","sha":"a88ed5a3db75f6257261dc707b3bca48556180f7","user":{"login":"Elixir-Girls","id":29187905,"avatar_url":"https://avatars2.githubusercontent.com/u/29187905?v=4","gravatar_id":"","url":"https://api.github.com/users/Elixir-Girls","html_url":"https://github.com/Elixir-Girls","followers_url":"https://api.github.com/users/Elixir-Girls/followers","following_url":"https://api.github.com/users/Elixir-Girls/following{/other_user}","gists_url":"https://api.github.com/users/Elixir-Girls/gists{/gist_id}","starred_url":"https://api.github.com/users/Elixir-Girls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elixir-Girls/subscriptions","organizations_url":"https://api.github.com/users/Elixir-Girls/orgs","repos_url":"https://api.github.com/users/Elixir-Girls/repos","events_url":"https://api.github.com/users/Elixir-Girls/events{/privacy}","received_events_url":"https://api.github.com/users/Elixir-Girls/received_events","type":"Organization","site_admin":false},"repo":{"id":97311203,"name":"elixir-girls.github.io","full_name":"Elixir-Girls/elixir-girls.github.io","owner":{"login":"Elixir-Girls","id":29187905,"avatar_url":"https://avatars2.githubusercontent.com/u/29187905?v=4","gravatar_id":"","url":"https://api.github.com/users/Elixir-Girls","html_url":"https://github.com/Elixir-Girls","followers_url":"https://api.github.com/users/Elixir-Girls/followers","following_url":"https://api.github.com/users/Elixir-Girls/following{/other_user}","gists_url":"https://api.github.com/users/Elixir-Girls/gists{/gist_id}","starred_url":"https://api.github.com/users/Elixir-Girls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elixir-Girls/subscriptions","organizations_url":"https://api.github.com/users/Elixir-Girls/orgs","repos_url":"https://api.github.com/users/Elixir-Girls/repos","events_url":"https://api.github.com/users/Elixir-Girls/events{/privacy}","received_events_url":"https://api.github.com/users/Elixir-Girls/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Elixir-Girls/elixir-girls.github.io","description":"The repository for the Elixir Girls website and guides","fork":false,"url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io","forks_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/forks","keys_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/teams","hooks_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/hooks","issue_events_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/events","assignees_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/tags","blobs_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/languages","stargazers_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/stargazers","contributors_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/contributors","subscribers_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/subscribers","subscription_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/subscription","commits_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/merges","archive_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/downloads","issues_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/labels{/name}","releases_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/deployments","created_at":"2017-07-15T11:19:32Z","updated_at":"2017-09-12T12:09:05Z","pushed_at":"2017-09-14T23:21:04Z","git_url":"git://github.com/Elixir-Girls/elixir-girls.github.io.git","ssh_url":"git@github.com:Elixir-Girls/elixir-girls.github.io.git","clone_url":"https://github.com/Elixir-Girls/elixir-girls.github.io.git","svn_url":"https://github.com/Elixir-Girls/elixir-girls.github.io","homepage":"http://elixirgirls.com/","size":2118,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":12,"forks":8,"open_issues":12,"watchers":2,"default_branch":"develop"}},"base":{"label":"Elixir-Girls:develop","ref":"develop","sha":"f608a8b8d6fd42601ffad5f3be0ade55223157be","user":{"login":"Elixir-Girls","id":29187905,"avatar_url":"https://avatars2.githubusercontent.com/u/29187905?v=4","gravatar_id":"","url":"https://api.github.com/users/Elixir-Girls","html_url":"https://github.com/Elixir-Girls","followers_url":"https://api.github.com/users/Elixir-Girls/followers","following_url":"https://api.github.com/users/Elixir-Girls/following{/other_user}","gists_url":"https://api.github.com/users/Elixir-Girls/gists{/gist_id}","starred_url":"https://api.github.com/users/Elixir-Girls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elixir-Girls/subscriptions","organizations_url":"https://api.github.com/users/Elixir-Girls/orgs","repos_url":"https://api.github.com/users/Elixir-Girls/repos","events_url":"https://api.github.com/users/Elixir-Girls/events{/privacy}","received_events_url":"https://api.github.com/users/Elixir-Girls/received_events","type":"Organization","site_admin":false},"repo":{"id":97311203,"name":"elixir-girls.github.io","full_name":"Elixir-Girls/elixir-girls.github.io","owner":{"login":"Elixir-Girls","id":29187905,"avatar_url":"https://avatars2.githubusercontent.com/u/29187905?v=4","gravatar_id":"","url":"https://api.github.com/users/Elixir-Girls","html_url":"https://github.com/Elixir-Girls","followers_url":"https://api.github.com/users/Elixir-Girls/followers","following_url":"https://api.github.com/users/Elixir-Girls/following{/other_user}","gists_url":"https://api.github.com/users/Elixir-Girls/gists{/gist_id}","starred_url":"https://api.github.com/users/Elixir-Girls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elixir-Girls/subscriptions","organizations_url":"https://api.github.com/users/Elixir-Girls/orgs","repos_url":"https://api.github.com/users/Elixir-Girls/repos","events_url":"https://api.github.com/users/Elixir-Girls/events{/privacy}","received_events_url":"https://api.github.com/users/Elixir-Girls/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Elixir-Girls/elixir-girls.github.io","description":"The repository for the Elixir Girls website and guides","fork":false,"url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io","forks_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/forks","keys_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/teams","hooks_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/hooks","issue_events_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/events","assignees_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/tags","blobs_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/languages","stargazers_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/stargazers","contributors_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/contributors","subscribers_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/subscribers","subscription_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/subscription","commits_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/merges","archive_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/downloads","issues_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/labels{/name}","releases_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/deployments","created_at":"2017-07-15T11:19:32Z","updated_at":"2017-09-12T12:09:05Z","pushed_at":"2017-09-14T23:21:04Z","git_url":"git://github.com/Elixir-Girls/elixir-girls.github.io.git","ssh_url":"git@github.com:Elixir-Girls/elixir-girls.github.io.git","clone_url":"https://github.com/Elixir-Girls/elixir-girls.github.io.git","svn_url":"https://github.com/Elixir-Girls/elixir-girls.github.io","homepage":"http://elixirgirls.com/","size":2118,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":12,"forks":8,"open_issues":12,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls/45"},"html":{"href":"https://github.com/Elixir-Girls/elixir-girls.github.io/pull/45"},"issue":{"href":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/issues/45"},"comments":{"href":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/Elixir-Girls/elixir-girls.github.io/statuses/a88ed5a3db75f6257261dc707b3bca48556180f7"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"brentonannan"}}