{"action":"created","comment":{"url":"https://api.github.com/repos/minetest/minetest_game/pulls/comments/106240740","pull_request_review_id":27153759,"id":106240740,"diff_hunk":"@@ -133,11 +133,14 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)\n \t\t\tend\n \t\tend\n \n-\t\tlocal data_str = minetest.serialize(data)\n-\t\tstack:set_metadata(data_str)\n+\t\tstack:get_meta():from_table(data)\n \t\tbook_on_use(stack, player)\n \tend\n \n+\t-- Backwards compatibility\n+\tstack:set_metadata(\"\")","path":"mods/default/craftitems.lua","position":null,"original_position":11,"commit_id":"580825b5d67eab661449c5b4ff9fdd4ba58a4a88","original_commit_id":"a3785cbe02c390379da560d37a98415ad6a67443","user":{"login":"SmallJoker","id":1497498,"avatar_url":"https://avatars2.githubusercontent.com/u/1497498?v=3","gravatar_id":"","url":"https://api.github.com/users/SmallJoker","html_url":"https://github.com/SmallJoker","followers_url":"https://api.github.com/users/SmallJoker/followers","following_url":"https://api.github.com/users/SmallJoker/following{/other_user}","gists_url":"https://api.github.com/users/SmallJoker/gists{/gist_id}","starred_url":"https://api.github.com/users/SmallJoker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SmallJoker/subscriptions","organizations_url":"https://api.github.com/users/SmallJoker/orgs","repos_url":"https://api.github.com/users/SmallJoker/repos","events_url":"https://api.github.com/users/SmallJoker/events{/privacy}","received_events_url":"https://api.github.com/users/SmallJoker/received_events","type":"User","site_admin":false},"body":"Alright, fine then. Thanks for the explanation.","created_at":"2017-03-15T18:04:00Z","updated_at":"2017-03-15T18:04:00Z","html_url":"https://github.com/minetest/minetest_game/pull/1636#discussion_r106240740","pull_request_url":"https://api.github.com/repos/minetest/minetest_game/pulls/1636","_links":{"self":{"href":"https://api.github.com/repos/minetest/minetest_game/pulls/comments/106240740"},"html":{"href":"https://github.com/minetest/minetest_game/pull/1636#discussion_r106240740"},"pull_request":{"href":"https://api.github.com/repos/minetest/minetest_game/pulls/1636"}}},"pull_request":{"url":"https://api.github.com/repos/minetest/minetest_game/pulls/1636","id":110550927,"html_url":"https://github.com/minetest/minetest_game/pull/1636","diff_url":"https://github.com/minetest/minetest_game/pull/1636.diff","patch_url":"https://github.com/minetest/minetest_game/pull/1636.patch","issue_url":"https://api.github.com/repos/minetest/minetest_game/issues/1636","number":1636,"state":"open","locked":false,"title":"Fix books backwards compatibility issues","user":{"login":"octacian","id":15371866,"avatar_url":"https://avatars0.githubusercontent.com/u/15371866?v=3","gravatar_id":"","url":"https://api.github.com/users/octacian","html_url":"https://github.com/octacian","followers_url":"https://api.github.com/users/octacian/followers","following_url":"https://api.github.com/users/octacian/following{/other_user}","gists_url":"https://api.github.com/users/octacian/gists{/gist_id}","starred_url":"https://api.github.com/users/octacian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octacian/subscriptions","organizations_url":"https://api.github.com/users/octacian/orgs","repos_url":"https://api.github.com/users/octacian/repos","events_url":"https://api.github.com/users/octacian/events{/privacy}","received_events_url":"https://api.github.com/users/octacian/received_events","type":"User","site_admin":false},"body":"Addresses #1622 and #1623\r\n\r\nc68b8274fed183f30bd7609018766a261448b83d prevented books from being copied in the crafting grid  and made it so that old books though seemingly successfully transferred to the new format could not be written to as the old data still persisted.\r\n\r\nMore info:\r\n* Crafting grid copying still used old `get_metadata()` which would be blank resulting in a blank book being copied.\r\n* There was one other instance in the book view for other players that still used old storage methods.\r\n* My backwards compatibility code in the local `book_on_use` function replaced the old meta with new meta. However, this code did not update the itemstack wielded by the player. My solution is to `set_metadata(\"\")` just before updating the wielded itemstack in `on_player_receive_fields.`","created_at":"2017-03-14T05:31:27Z","updated_at":"2017-03-15T18:04:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"182a6c14c1777aac8d151a9285afa0010f131541","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/minetest/minetest_game/pulls/1636/commits","review_comments_url":"https://api.github.com/repos/minetest/minetest_game/pulls/1636/comments","review_comment_url":"https://api.github.com/repos/minetest/minetest_game/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minetest/minetest_game/issues/1636/comments","statuses_url":"https://api.github.com/repos/minetest/minetest_game/statuses/580825b5d67eab661449c5b4ff9fdd4ba58a4a88","head":{"label":"octacian:books-fix","ref":"books-fix","sha":"580825b5d67eab661449c5b4ff9fdd4ba58a4a88","user":{"login":"octacian","id":15371866,"avatar_url":"https://avatars0.githubusercontent.com/u/15371866?v=3","gravatar_id":"","url":"https://api.github.com/users/octacian","html_url":"https://github.com/octacian","followers_url":"https://api.github.com/users/octacian/followers","following_url":"https://api.github.com/users/octacian/following{/other_user}","gists_url":"https://api.github.com/users/octacian/gists{/gist_id}","starred_url":"https://api.github.com/users/octacian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octacian/subscriptions","organizations_url":"https://api.github.com/users/octacian/orgs","repos_url":"https://api.github.com/users/octacian/repos","events_url":"https://api.github.com/users/octacian/events{/privacy}","received_events_url":"https://api.github.com/users/octacian/received_events","type":"User","site_admin":false},"repo":{"id":70607032,"name":"minetest_game","full_name":"octacian/minetest_game","owner":{"login":"octacian","id":15371866,"avatar_url":"https://avatars0.githubusercontent.com/u/15371866?v=3","gravatar_id":"","url":"https://api.github.com/users/octacian","html_url":"https://github.com/octacian","followers_url":"https://api.github.com/users/octacian/followers","following_url":"https://api.github.com/users/octacian/following{/other_user}","gists_url":"https://api.github.com/users/octacian/gists{/gist_id}","starred_url":"https://api.github.com/users/octacian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octacian/subscriptions","organizations_url":"https://api.github.com/users/octacian/orgs","repos_url":"https://api.github.com/users/octacian/repos","events_url":"https://api.github.com/users/octacian/events{/privacy}","received_events_url":"https://api.github.com/users/octacian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/octacian/minetest_game","description":"Minetest Game - The default game for the Minetest engine [https://github.com/minetest/minetest/]","fork":true,"url":"https://api.github.com/repos/octacian/minetest_game","forks_url":"https://api.github.com/repos/octacian/minetest_game/forks","keys_url":"https://api.github.com/repos/octacian/minetest_game/keys{/key_id}","collaborators_url":"https://api.github.com/repos/octacian/minetest_game/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/octacian/minetest_game/teams","hooks_url":"https://api.github.com/repos/octacian/minetest_game/hooks","issue_events_url":"https://api.github.com/repos/octacian/minetest_game/issues/events{/number}","events_url":"https://api.github.com/repos/octacian/minetest_game/events","assignees_url":"https://api.github.com/repos/octacian/minetest_game/assignees{/user}","branches_url":"https://api.github.com/repos/octacian/minetest_game/branches{/branch}","tags_url":"https://api.github.com/repos/octacian/minetest_game/tags","blobs_url":"https://api.github.com/repos/octacian/minetest_game/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/octacian/minetest_game/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/octacian/minetest_game/git/refs{/sha}","trees_url":"https://api.github.com/repos/octacian/minetest_game/git/trees{/sha}","statuses_url":"https://api.github.com/repos/octacian/minetest_game/statuses/{sha}","languages_url":"https://api.github.com/repos/octacian/minetest_game/languages","stargazers_url":"https://api.github.com/repos/octacian/minetest_game/stargazers","contributors_url":"https://api.github.com/repos/octacian/minetest_game/contributors","subscribers_url":"https://api.github.com/repos/octacian/minetest_game/subscribers","subscription_url":"https://api.github.com/repos/octacian/minetest_game/subscription","commits_url":"https://api.github.com/repos/octacian/minetest_game/commits{/sha}","git_commits_url":"https://api.github.com/repos/octacian/minetest_game/git/commits{/sha}","comments_url":"https://api.github.com/repos/octacian/minetest_game/comments{/number}","issue_comment_url":"https://api.github.com/repos/octacian/minetest_game/issues/comments{/number}","contents_url":"https://api.github.com/repos/octacian/minetest_game/contents/{+path}","compare_url":"https://api.github.com/repos/octacian/minetest_game/compare/{base}...{head}","merges_url":"https://api.github.com/repos/octacian/minetest_game/merges","archive_url":"https://api.github.com/repos/octacian/minetest_game/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/octacian/minetest_game/downloads","issues_url":"https://api.github.com/repos/octacian/minetest_game/issues{/number}","pulls_url":"https://api.github.com/repos/octacian/minetest_game/pulls{/number}","milestones_url":"https://api.github.com/repos/octacian/minetest_game/milestones{/number}","notifications_url":"https://api.github.com/repos/octacian/minetest_game/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/octacian/minetest_game/labels{/name}","releases_url":"https://api.github.com/repos/octacian/minetest_game/releases{/id}","deployments_url":"https://api.github.com/repos/octacian/minetest_game/deployments","created_at":"2016-10-11T15:21:37Z","updated_at":"2016-10-11T15:21:39Z","pushed_at":"2017-03-15T04:40:01Z","git_url":"git://github.com/octacian/minetest_game.git","ssh_url":"git@github.com:octacian/minetest_game.git","clone_url":"https://github.com/octacian/minetest_game.git","svn_url":"https://github.com/octacian/minetest_game","homepage":"http://minetest.net/","size":5742,"stargazers_count":0,"watchers_count":0,"language":"Lua","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"minetest:master","ref":"master","sha":"da69fcdf9130c1b0b918dc6b16b770a5eaff2ada","user":{"login":"minetest","id":2624745,"avatar_url":"https://avatars2.githubusercontent.com/u/2624745?v=3","gravatar_id":"","url":"https://api.github.com/users/minetest","html_url":"https://github.com/minetest","followers_url":"https://api.github.com/users/minetest/followers","following_url":"https://api.github.com/users/minetest/following{/other_user}","gists_url":"https://api.github.com/users/minetest/gists{/gist_id}","starred_url":"https://api.github.com/users/minetest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minetest/subscriptions","organizations_url":"https://api.github.com/users/minetest/orgs","repos_url":"https://api.github.com/users/minetest/repos","events_url":"https://api.github.com/users/minetest/events{/privacy}","received_events_url":"https://api.github.com/users/minetest/received_events","type":"Organization","site_admin":false},"repo":{"id":3834571,"name":"minetest_game","full_name":"minetest/minetest_game","owner":{"login":"minetest","id":2624745,"avatar_url":"https://avatars2.githubusercontent.com/u/2624745?v=3","gravatar_id":"","url":"https://api.github.com/users/minetest","html_url":"https://github.com/minetest","followers_url":"https://api.github.com/users/minetest/followers","following_url":"https://api.github.com/users/minetest/following{/other_user}","gists_url":"https://api.github.com/users/minetest/gists{/gist_id}","starred_url":"https://api.github.com/users/minetest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minetest/subscriptions","organizations_url":"https://api.github.com/users/minetest/orgs","repos_url":"https://api.github.com/users/minetest/repos","events_url":"https://api.github.com/users/minetest/events{/privacy}","received_events_url":"https://api.github.com/users/minetest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/minetest/minetest_game","description":"Minetest Game - The default game for the Minetest engine [https://github.com/minetest/minetest/]","fork":false,"url":"https://api.github.com/repos/minetest/minetest_game","forks_url":"https://api.github.com/repos/minetest/minetest_game/forks","keys_url":"https://api.github.com/repos/minetest/minetest_game/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minetest/minetest_game/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minetest/minetest_game/teams","hooks_url":"https://api.github.com/repos/minetest/minetest_game/hooks","issue_events_url":"https://api.github.com/repos/minetest/minetest_game/issues/events{/number}","events_url":"https://api.github.com/repos/minetest/minetest_game/events","assignees_url":"https://api.github.com/repos/minetest/minetest_game/assignees{/user}","branches_url":"https://api.github.com/repos/minetest/minetest_game/branches{/branch}","tags_url":"https://api.github.com/repos/minetest/minetest_game/tags","blobs_url":"https://api.github.com/repos/minetest/minetest_game/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minetest/minetest_game/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minetest/minetest_game/git/refs{/sha}","trees_url":"https://api.github.com/repos/minetest/minetest_game/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minetest/minetest_game/statuses/{sha}","languages_url":"https://api.github.com/repos/minetest/minetest_game/languages","stargazers_url":"https://api.github.com/repos/minetest/minetest_game/stargazers","contributors_url":"https://api.github.com/repos/minetest/minetest_game/contributors","subscribers_url":"https://api.github.com/repos/minetest/minetest_game/subscribers","subscription_url":"https://api.github.com/repos/minetest/minetest_game/subscription","commits_url":"https://api.github.com/repos/minetest/minetest_game/commits{/sha}","git_commits_url":"https://api.github.com/repos/minetest/minetest_game/git/commits{/sha}","comments_url":"https://api.github.com/repos/minetest/minetest_game/comments{/number}","issue_comment_url":"https://api.github.com/repos/minetest/minetest_game/issues/comments{/number}","contents_url":"https://api.github.com/repos/minetest/minetest_game/contents/{+path}","compare_url":"https://api.github.com/repos/minetest/minetest_game/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minetest/minetest_game/merges","archive_url":"https://api.github.com/repos/minetest/minetest_game/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minetest/minetest_game/downloads","issues_url":"https://api.github.com/repos/minetest/minetest_game/issues{/number}","pulls_url":"https://api.github.com/repos/minetest/minetest_game/pulls{/number}","milestones_url":"https://api.github.com/repos/minetest/minetest_game/milestones{/number}","notifications_url":"https://api.github.com/repos/minetest/minetest_game/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minetest/minetest_game/labels{/name}","releases_url":"https://api.github.com/repos/minetest/minetest_game/releases{/id}","deployments_url":"https://api.github.com/repos/minetest/minetest_game/deployments","created_at":"2012-03-26T16:03:29Z","updated_at":"2017-03-12T09:48:53Z","pushed_at":"2017-03-15T12:05:12Z","git_url":"git://github.com/minetest/minetest_game.git","ssh_url":"git@github.com:minetest/minetest_game.git","clone_url":"https://github.com/minetest/minetest_game.git","svn_url":"https://github.com/minetest/minetest_game","homepage":"http://minetest.net/","size":5736,"stargazers_count":484,"watchers_count":484,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":291,"mirror_url":null,"open_issues_count":94,"forks":291,"open_issues":94,"watchers":484,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minetest/minetest_game/pulls/1636"},"html":{"href":"https://github.com/minetest/minetest_game/pull/1636"},"issue":{"href":"https://api.github.com/repos/minetest/minetest_game/issues/1636"},"comments":{"href":"https://api.github.com/repos/minetest/minetest_game/issues/1636/comments"},"review_comments":{"href":"https://api.github.com/repos/minetest/minetest_game/pulls/1636/comments"},"review_comment":{"href":"https://api.github.com/repos/minetest/minetest_game/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minetest/minetest_game/pulls/1636/commits"},"statuses":{"href":"https://api.github.com/repos/minetest/minetest_game/statuses/580825b5d67eab661449c5b4ff9fdd4ba58a4a88"}}}}
{"actor":{"display_login":"SmallJoker"}}