{"action":"created","comment":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments/22806636","id":22806636,"diff_hunk":"@@ -40,7 +41,16 @@ - (void)exportAsset:(ALAsset *)asset\n    stripGeoLocation:(BOOL)stripGeoLocation\n   completionHandler:(void (^)(BOOL success, CGSize resultingSize, NSData *thumbnailData, NSError *error)) handler\n {\n-\n+    if (!asset.defaultRepresentation) {\n+        if (handler) {\n+            NSDictionary * userInfo = @{NSLocalizedDescriptionKey:NSLocalizedString(@\"The media you are trying to use is not available locally at the moment. If it belongs to a photo stream please try again later.\", @\"Message that explains to a user that the current asset they selected is not available on the device. This normally happens when user selects a media that belogns to a photostream that needs to be downloaded locally first.\")};","path":"WordPress/Classes/Utility/WPAssetExporter.m","position":19,"original_position":19,"commit_id":"ab6dae544b8f641d0fc71f88f9e8012d04895aa9","original_commit_id":"b13d5968688c86bccda85ae10fd548040ddbf6ca","user":{"login":"SergioEstevao","id":651601,"avatar_url":"https://avatars.githubusercontent.com/u/651601?v=3","gravatar_id":"","url":"https://api.github.com/users/SergioEstevao","html_url":"https://github.com/SergioEstevao","followers_url":"https://api.github.com/users/SergioEstevao/followers","following_url":"https://api.github.com/users/SergioEstevao/following{/other_user}","gists_url":"https://api.github.com/users/SergioEstevao/gists{/gist_id}","starred_url":"https://api.github.com/users/SergioEstevao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergioEstevao/subscriptions","organizations_url":"https://api.github.com/users/SergioEstevao/orgs","repos_url":"https://api.github.com/users/SergioEstevao/repos","events_url":"https://api.github.com/users/SergioEstevao/events{/privacy}","received_events_url":"https://api.github.com/users/SergioEstevao/received_events","type":"User","site_admin":false},"body":"It's not exactly a problem with the owner of the Photo Stream, even your Photo Streams can have this problem. Imagine you save a image on your iPad and add it to your photo stream, when you get to your iphone you can have this issue when trying to select the image.","created_at":"2015-01-12T17:43:39Z","updated_at":"2015-01-12T17:43:39Z","html_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/3028#discussion_r22806636","pull_request_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/3028","_links":{"self":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments/22806636"},"html":{"href":"https://github.com/wordpress-mobile/WordPress-iOS/pull/3028#discussion_r22806636"},"pull_request":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/3028"}}},"pull_request":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/3028","id":27192134,"html_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/3028","diff_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/3028.diff","patch_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/3028.patch","issue_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/3028","number":3028,"state":"open","locked":false,"title":"Issue/473 editor adding images from photo stream","user":{"login":"SergioEstevao","id":651601,"avatar_url":"https://avatars.githubusercontent.com/u/651601?v=3","gravatar_id":"","url":"https://api.github.com/users/SergioEstevao","html_url":"https://github.com/SergioEstevao","followers_url":"https://api.github.com/users/SergioEstevao/followers","following_url":"https://api.github.com/users/SergioEstevao/following{/other_user}","gists_url":"https://api.github.com/users/SergioEstevao/gists{/gist_id}","starred_url":"https://api.github.com/users/SergioEstevao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergioEstevao/subscriptions","organizations_url":"https://api.github.com/users/SergioEstevao/orgs","repos_url":"https://api.github.com/users/SergioEstevao/repos","events_url":"https://api.github.com/users/SergioEstevao/events{/privacy}","received_events_url":"https://api.github.com/users/SergioEstevao/received_events","type":"User","site_admin":false},"body":"Introduced multiple checks for ALAsset that may not be available locally because they are part of shared photo stream. This caused crash because they return nil/empty images.\r\n\r\nFix for https://github.com/wordpress-mobile/WordPress-iOS-Editor/issues/473\r\n\r\ncc @diegoreymendez, can you do a review?\r\ncc @meremagee Do you want to check my wording for the alert messages.\r\n\r\n","created_at":"2015-01-12T12:57:46Z","updated_at":"2015-01-12T17:43:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6ac4dcffdd8f8c450e111594f8df6dbcf147a19","assignee":{"login":"diegoreymendez","id":1836005,"avatar_url":"https://avatars.githubusercontent.com/u/1836005?v=3","gravatar_id":"","url":"https://api.github.com/users/diegoreymendez","html_url":"https://github.com/diegoreymendez","followers_url":"https://api.github.com/users/diegoreymendez/followers","following_url":"https://api.github.com/users/diegoreymendez/following{/other_user}","gists_url":"https://api.github.com/users/diegoreymendez/gists{/gist_id}","starred_url":"https://api.github.com/users/diegoreymendez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diegoreymendez/subscriptions","organizations_url":"https://api.github.com/users/diegoreymendez/orgs","repos_url":"https://api.github.com/users/diegoreymendez/repos","events_url":"https://api.github.com/users/diegoreymendez/events{/privacy}","received_events_url":"https://api.github.com/users/diegoreymendez/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/3028/commits","review_comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/3028/comments","review_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments/{number}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/3028/comments","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/ab6dae544b8f641d0fc71f88f9e8012d04895aa9","head":{"label":"wordpress-mobile:issue/473-editor-addingImagesFromPhotoStream","ref":"issue/473-editor-addingImagesFromPhotoStream","sha":"ab6dae544b8f641d0fc71f88f9e8012d04895aa9","user":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":8859285,"name":"WordPress-iOS","full_name":"wordpress-mobile/WordPress-iOS","owner":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wordpress-mobile/WordPress-iOS","description":"WordPress for iOS - Official repository","fork":false,"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS","forks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/forks","keys_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/teams","hooks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/hooks","issue_events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/events","assignees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/tags","blobs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/languages","stargazers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/stargazers","contributors_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contributors","subscribers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscribers","subscription_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscription","commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/comments/{number}","contents_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/merges","archive_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/downloads","issues_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/labels{/name}","releases_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/releases{/id}","created_at":"2013-03-18T16:59:33Z","updated_at":"2015-01-12T14:41:43Z","pushed_at":"2015-01-12T17:40:58Z","git_url":"git://github.com/wordpress-mobile/WordPress-iOS.git","ssh_url":"git@github.com:wordpress-mobile/WordPress-iOS.git","clone_url":"https://github.com/wordpress-mobile/WordPress-iOS.git","svn_url":"https://github.com/wordpress-mobile/WordPress-iOS","homepage":"http://ios.wordpress.org/","size":363877,"stargazers_count":485,"watchers_count":485,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":259,"mirror_url":null,"open_issues_count":303,"forks":259,"open_issues":303,"watchers":485,"default_branch":"develop"}},"base":{"label":"wordpress-mobile:release/4.7","ref":"release/4.7","sha":"d3dbf4baf5c3548a7c47862914a829b413f2d4b2","user":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":8859285,"name":"WordPress-iOS","full_name":"wordpress-mobile/WordPress-iOS","owner":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wordpress-mobile/WordPress-iOS","description":"WordPress for iOS - Official repository","fork":false,"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS","forks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/forks","keys_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/teams","hooks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/hooks","issue_events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/events","assignees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/tags","blobs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/languages","stargazers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/stargazers","contributors_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contributors","subscribers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscribers","subscription_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/subscription","commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/comments/{number}","contents_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/merges","archive_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/downloads","issues_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/labels{/name}","releases_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/releases{/id}","created_at":"2013-03-18T16:59:33Z","updated_at":"2015-01-12T14:41:43Z","pushed_at":"2015-01-12T17:40:58Z","git_url":"git://github.com/wordpress-mobile/WordPress-iOS.git","ssh_url":"git@github.com:wordpress-mobile/WordPress-iOS.git","clone_url":"https://github.com/wordpress-mobile/WordPress-iOS.git","svn_url":"https://github.com/wordpress-mobile/WordPress-iOS","homepage":"http://ios.wordpress.org/","size":363877,"stargazers_count":485,"watchers_count":485,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":259,"mirror_url":null,"open_issues_count":303,"forks":259,"open_issues":303,"watchers":485,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/3028"},"html":{"href":"https://github.com/wordpress-mobile/WordPress-iOS/pull/3028"},"issue":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/3028"},"comments":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/3028/comments"},"review_comments":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/3028/comments"},"review_comment":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/3028/commits"},"statuses":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/statuses/ab6dae544b8f641d0fc71f88f9e8012d04895aa9"}}}}