{"action":"created","comment":{"url":"https://api.github.com/repos/holochain/holochain-rust/pulls/comments/239964299","pull_request_review_id":182895337,"id":239964299,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTk2NDI5OQ==","diff_hunk":"@@ -61,37 +49,26 @@ fn publish_link(\n     };\n     let link = link_add.link().clone();\n \n-    //let header = maybe_header.unwrap();\n-    let data = DhtMetaData {\n-        msg_id: \"?\".to_string(),\n-        dna_hash: network_state.dna_hash.clone().unwrap(),\n-        agent_id: network_state.agent_id.clone().unwrap(),\n-        address: link.base().to_string(),\n-        attribute: String::from(\"link\"),\n-        content: serde_json::from_str(&serde_json::to_string(&entry_with_header).unwrap()).unwrap(),\n-    };\n-\n-    network_state\n-        .network\n-        .as_mut()\n-        .map(|network| {\n-            network\n-                .lock()\n-                .unwrap()\n-                .send(ProtocolWrapper::PublishDhtMeta(data).into())\n-                .map_err(|error| HolochainError::IoError(error.to_string()))\n-        })\n-        .expect(\"Network has to be Some because of check above\")\n+    send(\n+        network_state,\n+        ProtocolWrapper::PublishDhtMeta(DhtMetaData {\n+            msg_id: \"?\".to_string(),\n+            dna_hash: network_state.dna_hash.clone().unwrap(),\n+            agent_id: network_state.agent_id.clone().unwrap(),\n+            address: link.base().to_string(),\n+            attribute: String::from(\"link\"),\n+            content: serde_json::from_str(&serde_json::to_string(&entry_with_header).unwrap())","path":"core/src/network/reducers/publish.rs","position":92,"original_position":92,"commit_id":"142076dab2639df9f84ab4b4e27d05c60a1918f0","original_commit_id":"142076dab2639df9f84ab4b4e27d05c60a1918f0","user":{"login":"zippy","id":3563,"node_id":"MDQ6VXNlcjM1NjM=","avatar_url":"https://avatars0.githubusercontent.com/u/3563?v=4","gravatar_id":"","url":"https://api.github.com/users/zippy","html_url":"https://github.com/zippy","followers_url":"https://api.github.com/users/zippy/followers","following_url":"https://api.github.com/users/zippy/following{/other_user}","gists_url":"https://api.github.com/users/zippy/gists{/gist_id}","starred_url":"https://api.github.com/users/zippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zippy/subscriptions","organizations_url":"https://api.github.com/users/zippy/orgs","repos_url":"https://api.github.com/users/zippy/repos","events_url":"https://api.github.com/users/zippy/events{/privacy}","received_events_url":"https://api.github.com/users/zippy/received_events","type":"User","site_admin":false},"body":"ditto JsonString","created_at":"2018-12-07T22:25:23Z","updated_at":"2018-12-07T22:31:06Z","html_url":"https://github.com/holochain/holochain-rust/pull/727#discussion_r239964299","pull_request_url":"https://api.github.com/repos/holochain/holochain-rust/pulls/727","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/holochain/holochain-rust/pulls/comments/239964299"},"html":{"href":"https://github.com/holochain/holochain-rust/pull/727#discussion_r239964299"},"pull_request":{"href":"https://api.github.com/repos/holochain/holochain-rust/pulls/727"}}},"pull_request":{"url":"https://api.github.com/repos/holochain/holochain-rust/pulls/727","id":236329577,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2MzI5NTc3","html_url":"https://github.com/holochain/holochain-rust/pull/727","diff_url":"https://github.com/holochain/holochain-rust/pull/727.diff","patch_url":"https://github.com/holochain/holochain-rust/pull/727.patch","issue_url":"https://api.github.com/repos/holochain/holochain-rust/issues/727","number":727,"state":"open","locked":false,"title":"Get ValidationPackage over network","user":{"login":"lucksus","id":311749,"node_id":"MDQ6VXNlcjMxMTc0OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/311749?v=4","gravatar_id":"","url":"https://api.github.com/users/lucksus","html_url":"https://github.com/lucksus","followers_url":"https://api.github.com/users/lucksus/followers","following_url":"https://api.github.com/users/lucksus/following{/other_user}","gists_url":"https://api.github.com/users/lucksus/gists{/gist_id}","starred_url":"https://api.github.com/users/lucksus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucksus/subscriptions","organizations_url":"https://api.github.com/users/lucksus/orgs","repos_url":"https://api.github.com/users/lucksus/repos","events_url":"https://api.github.com/users/lucksus/events{/privacy}","received_events_url":"https://api.github.com/users/lucksus/received_events","type":"User","site_admin":false},"body":"# Context\r\nImplements this state: https://realtimeboard.com/app/board/o9J_kyiXmFs=/?moveToWidget=3074457346314392714\r\n\r\n![screenshot 2018-12-07 at 17 36 48](https://user-images.githubusercontent.com/311749/49660403-c84dd980-fa46-11e8-9889-b029d564dd04.png)\r\n\r\n# Implementation steps in this PR\r\n- [x] Protocol for node2node messages `DirectMessage` with variants `RequestValidationPackage` and `ValidationPackage`\r\n- [x] `Action::GetValidationPackage` with reducer and action creator that lets the network send a `DirectMessage::RequestValidationPackage` to the entries source\r\n- [x] handler for the request that triggers the new workflow:\r\n- [x] `workflows::respond_validation_package_request` that checks if we have the entry in the source chain, builds the validation package and then triggers sending of the response via:\r\n- [x] `Action::SendDirectMessage` that makes the network send any (initial or responding) node2node message\r\n- [x] handler for the response of a validation package request `DirectMessage::ValidationPackage` that updates the state so the `GetValidationPackageFuture` can resolve\r\n\r\n# Additional required changes in here\r\n* Had to make sure that `Entry::address()` returns the right address also for agent_id entries which override the hashing of the content and instead have their public key be the address (https://github.com/holochain/holochain-rust/pull/727/commits/6f494af8967b5b55cbe32b4a581b28d7280e8d2b and https://github.com/holochain/holochain-rust/pull/727/commits/b66068a7129db1e4013d50302f88dd3c937407ac)\r\n* `ProtocolWrapper::SendResult` and `ProtocolWrapper::HandleSendResult` were mixed up (right, @neonphog? Or did I get it wrong?) I've swapped them to have *handle* always mean that the network requests core to handle something. (https://github.com/holochain/holochain-rust/pull/727/commits/76fa8420a9ea43014891b284ea4ece3a823f27ad and https://github.com/holochain/holochain-rust/pull/727/commits/e812ae798223730d94c709fe83bdb8b1f59db04f)","created_at":"2018-12-05T21:31:52Z","updated_at":"2018-12-07T22:31:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"abc268a5e9bc411098b8d2146a20fe8d1b2da6ab","assignee":null,"assignees":[],"requested_reviewers":[{"login":"thedavidmeister","id":629710,"node_id":"MDQ6VXNlcjYyOTcxMA==","avatar_url":"https://avatars2.githubusercontent.com/u/629710?v=4","gravatar_id":"","url":"https://api.github.com/users/thedavidmeister","html_url":"https://github.com/thedavidmeister","followers_url":"https://api.github.com/users/thedavidmeister/followers","following_url":"https://api.github.com/users/thedavidmeister/following{/other_user}","gists_url":"https://api.github.com/users/thedavidmeister/gists{/gist_id}","starred_url":"https://api.github.com/users/thedavidmeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thedavidmeister/subscriptions","organizations_url":"https://api.github.com/users/thedavidmeister/orgs","repos_url":"https://api.github.com/users/thedavidmeister/repos","events_url":"https://api.github.com/users/thedavidmeister/events{/privacy}","received_events_url":"https://api.github.com/users/thedavidmeister/received_events","type":"User","site_admin":false},{"login":"sphinxc0re","id":3702016,"node_id":"MDQ6VXNlcjM3MDIwMTY=","avatar_url":"https://avatars3.githubusercontent.com/u/3702016?v=4","gravatar_id":"","url":"https://api.github.com/users/sphinxc0re","html_url":"https://github.com/sphinxc0re","followers_url":"https://api.github.com/users/sphinxc0re/followers","following_url":"https://api.github.com/users/sphinxc0re/following{/other_user}","gists_url":"https://api.github.com/users/sphinxc0re/gists{/gist_id}","starred_url":"https://api.github.com/users/sphinxc0re/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sphinxc0re/subscriptions","organizations_url":"https://api.github.com/users/sphinxc0re/orgs","repos_url":"https://api.github.com/users/sphinxc0re/repos","events_url":"https://api.github.com/users/sphinxc0re/events{/privacy}","received_events_url":"https://api.github.com/users/sphinxc0re/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":937673517,"node_id":"MDU6TGFiZWw5Mzc2NzM1MTc=","url":"https://api.github.com/repos/holochain/holochain-rust/labels/review","name":"review","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/holochain/holochain-rust/pulls/727/commits","review_comments_url":"https://api.github.com/repos/holochain/holochain-rust/pulls/727/comments","review_comment_url":"https://api.github.com/repos/holochain/holochain-rust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/holochain/holochain-rust/issues/727/comments","statuses_url":"https://api.github.com/repos/holochain/holochain-rust/statuses/142076dab2639df9f84ab4b4e27d05c60a1918f0","head":{"label":"holochain:validation-over-network","ref":"validation-over-network","sha":"142076dab2639df9f84ab4b4e27d05c60a1918f0","user":{"login":"holochain","id":29492745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NDkyNzQ1","avatar_url":"https://avatars2.githubusercontent.com/u/29492745?v=4","gravatar_id":"","url":"https://api.github.com/users/holochain","html_url":"https://github.com/holochain","followers_url":"https://api.github.com/users/holochain/followers","following_url":"https://api.github.com/users/holochain/following{/other_user}","gists_url":"https://api.github.com/users/holochain/gists{/gist_id}","starred_url":"https://api.github.com/users/holochain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holochain/subscriptions","organizations_url":"https://api.github.com/users/holochain/orgs","repos_url":"https://api.github.com/users/holochain/repos","events_url":"https://api.github.com/users/holochain/events{/privacy}","received_events_url":"https://api.github.com/users/holochain/received_events","type":"Organization","site_admin":false},"repo":{"id":133449383,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM0NDkzODM=","name":"holochain-rust","full_name":"holochain/holochain-rust","private":false,"owner":{"login":"holochain","id":29492745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NDkyNzQ1","avatar_url":"https://avatars2.githubusercontent.com/u/29492745?v=4","gravatar_id":"","url":"https://api.github.com/users/holochain","html_url":"https://github.com/holochain","followers_url":"https://api.github.com/users/holochain/followers","following_url":"https://api.github.com/users/holochain/following{/other_user}","gists_url":"https://api.github.com/users/holochain/gists{/gist_id}","starred_url":"https://api.github.com/users/holochain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holochain/subscriptions","organizations_url":"https://api.github.com/users/holochain/orgs","repos_url":"https://api.github.com/users/holochain/repos","events_url":"https://api.github.com/users/holochain/events{/privacy}","received_events_url":"https://api.github.com/users/holochain/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/holochain/holochain-rust","description":"The core Holochain framework written in Rust, a container API for that, and hdk-rust library for Zomes","fork":false,"url":"https://api.github.com/repos/holochain/holochain-rust","forks_url":"https://api.github.com/repos/holochain/holochain-rust/forks","keys_url":"https://api.github.com/repos/holochain/holochain-rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holochain/holochain-rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holochain/holochain-rust/teams","hooks_url":"https://api.github.com/repos/holochain/holochain-rust/hooks","issue_events_url":"https://api.github.com/repos/holochain/holochain-rust/issues/events{/number}","events_url":"https://api.github.com/repos/holochain/holochain-rust/events","assignees_url":"https://api.github.com/repos/holochain/holochain-rust/assignees{/user}","branches_url":"https://api.github.com/repos/holochain/holochain-rust/branches{/branch}","tags_url":"https://api.github.com/repos/holochain/holochain-rust/tags","blobs_url":"https://api.github.com/repos/holochain/holochain-rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holochain/holochain-rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holochain/holochain-rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/holochain/holochain-rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holochain/holochain-rust/statuses/{sha}","languages_url":"https://api.github.com/repos/holochain/holochain-rust/languages","stargazers_url":"https://api.github.com/repos/holochain/holochain-rust/stargazers","contributors_url":"https://api.github.com/repos/holochain/holochain-rust/contributors","subscribers_url":"https://api.github.com/repos/holochain/holochain-rust/subscribers","subscription_url":"https://api.github.com/repos/holochain/holochain-rust/subscription","commits_url":"https://api.github.com/repos/holochain/holochain-rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/holochain/holochain-rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/holochain/holochain-rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/holochain/holochain-rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/holochain/holochain-rust/contents/{+path}","compare_url":"https://api.github.com/repos/holochain/holochain-rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holochain/holochain-rust/merges","archive_url":"https://api.github.com/repos/holochain/holochain-rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holochain/holochain-rust/downloads","issues_url":"https://api.github.com/repos/holochain/holochain-rust/issues{/number}","pulls_url":"https://api.github.com/repos/holochain/holochain-rust/pulls{/number}","milestones_url":"https://api.github.com/repos/holochain/holochain-rust/milestones{/number}","notifications_url":"https://api.github.com/repos/holochain/holochain-rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holochain/holochain-rust/labels{/name}","releases_url":"https://api.github.com/repos/holochain/holochain-rust/releases{/id}","deployments_url":"https://api.github.com/repos/holochain/holochain-rust/deployments","created_at":"2018-05-15T02:42:12Z","updated_at":"2018-12-07T15:30:45Z","pushed_at":"2018-12-07T21:57:02Z","git_url":"git://github.com/holochain/holochain-rust.git","ssh_url":"git@github.com:holochain/holochain-rust.git","clone_url":"https://github.com/holochain/holochain-rust.git","svn_url":"https://github.com/holochain/holochain-rust","homepage":"","size":169511,"stargazers_count":248,"watchers_count":248,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":53,"mirror_url":null,"archived":false,"open_issues_count":211,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":53,"open_issues":211,"watchers":248,"default_branch":"develop"}},"base":{"label":"holochain:develop","ref":"develop","sha":"fc21e5b68fae9b9f8265fd70069d5fbe5f137afe","user":{"login":"holochain","id":29492745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NDkyNzQ1","avatar_url":"https://avatars2.githubusercontent.com/u/29492745?v=4","gravatar_id":"","url":"https://api.github.com/users/holochain","html_url":"https://github.com/holochain","followers_url":"https://api.github.com/users/holochain/followers","following_url":"https://api.github.com/users/holochain/following{/other_user}","gists_url":"https://api.github.com/users/holochain/gists{/gist_id}","starred_url":"https://api.github.com/users/holochain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holochain/subscriptions","organizations_url":"https://api.github.com/users/holochain/orgs","repos_url":"https://api.github.com/users/holochain/repos","events_url":"https://api.github.com/users/holochain/events{/privacy}","received_events_url":"https://api.github.com/users/holochain/received_events","type":"Organization","site_admin":false},"repo":{"id":133449383,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM0NDkzODM=","name":"holochain-rust","full_name":"holochain/holochain-rust","private":false,"owner":{"login":"holochain","id":29492745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NDkyNzQ1","avatar_url":"https://avatars2.githubusercontent.com/u/29492745?v=4","gravatar_id":"","url":"https://api.github.com/users/holochain","html_url":"https://github.com/holochain","followers_url":"https://api.github.com/users/holochain/followers","following_url":"https://api.github.com/users/holochain/following{/other_user}","gists_url":"https://api.github.com/users/holochain/gists{/gist_id}","starred_url":"https://api.github.com/users/holochain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holochain/subscriptions","organizations_url":"https://api.github.com/users/holochain/orgs","repos_url":"https://api.github.com/users/holochain/repos","events_url":"https://api.github.com/users/holochain/events{/privacy}","received_events_url":"https://api.github.com/users/holochain/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/holochain/holochain-rust","description":"The core Holochain framework written in Rust, a container API for that, and hdk-rust library for Zomes","fork":false,"url":"https://api.github.com/repos/holochain/holochain-rust","forks_url":"https://api.github.com/repos/holochain/holochain-rust/forks","keys_url":"https://api.github.com/repos/holochain/holochain-rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holochain/holochain-rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holochain/holochain-rust/teams","hooks_url":"https://api.github.com/repos/holochain/holochain-rust/hooks","issue_events_url":"https://api.github.com/repos/holochain/holochain-rust/issues/events{/number}","events_url":"https://api.github.com/repos/holochain/holochain-rust/events","assignees_url":"https://api.github.com/repos/holochain/holochain-rust/assignees{/user}","branches_url":"https://api.github.com/repos/holochain/holochain-rust/branches{/branch}","tags_url":"https://api.github.com/repos/holochain/holochain-rust/tags","blobs_url":"https://api.github.com/repos/holochain/holochain-rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holochain/holochain-rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holochain/holochain-rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/holochain/holochain-rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holochain/holochain-rust/statuses/{sha}","languages_url":"https://api.github.com/repos/holochain/holochain-rust/languages","stargazers_url":"https://api.github.com/repos/holochain/holochain-rust/stargazers","contributors_url":"https://api.github.com/repos/holochain/holochain-rust/contributors","subscribers_url":"https://api.github.com/repos/holochain/holochain-rust/subscribers","subscription_url":"https://api.github.com/repos/holochain/holochain-rust/subscription","commits_url":"https://api.github.com/repos/holochain/holochain-rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/holochain/holochain-rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/holochain/holochain-rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/holochain/holochain-rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/holochain/holochain-rust/contents/{+path}","compare_url":"https://api.github.com/repos/holochain/holochain-rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holochain/holochain-rust/merges","archive_url":"https://api.github.com/repos/holochain/holochain-rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holochain/holochain-rust/downloads","issues_url":"https://api.github.com/repos/holochain/holochain-rust/issues{/number}","pulls_url":"https://api.github.com/repos/holochain/holochain-rust/pulls{/number}","milestones_url":"https://api.github.com/repos/holochain/holochain-rust/milestones{/number}","notifications_url":"https://api.github.com/repos/holochain/holochain-rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holochain/holochain-rust/labels{/name}","releases_url":"https://api.github.com/repos/holochain/holochain-rust/releases{/id}","deployments_url":"https://api.github.com/repos/holochain/holochain-rust/deployments","created_at":"2018-05-15T02:42:12Z","updated_at":"2018-12-07T15:30:45Z","pushed_at":"2018-12-07T21:57:02Z","git_url":"git://github.com/holochain/holochain-rust.git","ssh_url":"git@github.com:holochain/holochain-rust.git","clone_url":"https://github.com/holochain/holochain-rust.git","svn_url":"https://github.com/holochain/holochain-rust","homepage":"","size":169511,"stargazers_count":248,"watchers_count":248,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":53,"mirror_url":null,"archived":false,"open_issues_count":211,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":53,"open_issues":211,"watchers":248,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/holochain/holochain-rust/pulls/727"},"html":{"href":"https://github.com/holochain/holochain-rust/pull/727"},"issue":{"href":"https://api.github.com/repos/holochain/holochain-rust/issues/727"},"comments":{"href":"https://api.github.com/repos/holochain/holochain-rust/issues/727/comments"},"review_comments":{"href":"https://api.github.com/repos/holochain/holochain-rust/pulls/727/comments"},"review_comment":{"href":"https://api.github.com/repos/holochain/holochain-rust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/holochain/holochain-rust/pulls/727/commits"},"statuses":{"href":"https://api.github.com/repos/holochain/holochain-rust/statuses/142076dab2639df9f84ab4b4e27d05c60a1918f0"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"zippy"}}