{"action":"created","comment":{"url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls/comments/71686079","id":71686079,"diff_hunk":"@@ -209,6 +209,45 @@ - (void)getImageForAttachmentMessage:(QBChatMessage *)attachmentMessage completi\n     }\n }\n \n+- (void)getLocalImageForAttachmentMessage:(QB_NONNULL QBChatMessage *)attachmentMessage completion:(void(^QB_NULLABLE_S)(NSError *QB_NULLABLE_S error, UIImage *QB_NULLABLE_S image))completion {\n+    \n+    if (attachmentMessage.attachmentStatus == QMMessageAttachmentStatusLoading || attachmentMessage.attachmentStatus == QMMessageAttachmentStatusError) {\n+        return;\n+    }\n+    \n+    QBChatAttachment *attachment = [attachmentMessage.attachments firstObject];\n+    \n+    // checking attachment in storage\n+    if ([self.attachmentsStorage objectForKey:attachment.ID] != nil) {\n+        if (completion) completion(nil, [self.attachmentsStorage objectForKey:attachment.ID]);\n+        return;\n+    }\n+    \n+    // checking attachment in cache\n+    NSString *path = attachmentPath(attachment);\n+    if ([[NSFileManager defaultManager] fileExistsAtPath:path]) {\n+        \n+        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{","path":"QMChatService/QMChatService/QMChatAttachmentService.m","position":22,"original_position":22,"commit_id":"4e5b2e1a48372abe56cff8614b9823f30792d042","original_commit_id":"4e5b2e1a48372abe56cff8614b9823f30792d042","user":{"login":"Pro100Andrey","id":1109916,"avatar_url":"https://avatars.githubusercontent.com/u/1109916?v=3","gravatar_id":"","url":"https://api.github.com/users/Pro100Andrey","html_url":"https://github.com/Pro100Andrey","followers_url":"https://api.github.com/users/Pro100Andrey/followers","following_url":"https://api.github.com/users/Pro100Andrey/following{/other_user}","gists_url":"https://api.github.com/users/Pro100Andrey/gists{/gist_id}","starred_url":"https://api.github.com/users/Pro100Andrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pro100Andrey/subscriptions","organizations_url":"https://api.github.com/users/Pro100Andrey/orgs","repos_url":"https://api.github.com/users/Pro100Andrey/repos","events_url":"https://api.github.com/users/Pro100Andrey/events{/privacy}","received_events_url":"https://api.github.com/users/Pro100Andrey/received_events","type":"User","site_admin":false},"body":"use serial queue","created_at":"2016-07-21T11:05:52Z","updated_at":"2016-07-21T11:05:52Z","html_url":"https://github.com/QuickBlox/q-municate-services-ios/pull/241#discussion_r71686079","pull_request_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls/241","_links":{"self":{"href":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls/comments/71686079"},"html":{"href":"https://github.com/QuickBlox/q-municate-services-ios/pull/241#discussion_r71686079"},"pull_request":{"href":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls/241"}}},"pull_request":{"url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls/241","id":78163767,"html_url":"https://github.com/QuickBlox/q-municate-services-ios/pull/241","diff_url":"https://github.com/QuickBlox/q-municate-services-ios/pull/241.diff","patch_url":"https://github.com/QuickBlox/q-municate-services-ios/pull/241.patch","issue_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/issues/241","number":241,"state":"open","locked":false,"title":"added method for getting local image","user":{"login":"VitaliyGuru","id":4947664,"avatar_url":"https://avatars.githubusercontent.com/u/4947664?v=3","gravatar_id":"","url":"https://api.github.com/users/VitaliyGuru","html_url":"https://github.com/VitaliyGuru","followers_url":"https://api.github.com/users/VitaliyGuru/followers","following_url":"https://api.github.com/users/VitaliyGuru/following{/other_user}","gists_url":"https://api.github.com/users/VitaliyGuru/gists{/gist_id}","starred_url":"https://api.github.com/users/VitaliyGuru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VitaliyGuru/subscriptions","organizations_url":"https://api.github.com/users/VitaliyGuru/orgs","repos_url":"https://api.github.com/users/VitaliyGuru/repos","events_url":"https://api.github.com/users/VitaliyGuru/events{/privacy}","received_events_url":"https://api.github.com/users/VitaliyGuru/received_events","type":"User","site_admin":false},"body":"\r\n","created_at":"2016-07-20T15:05:14Z","updated_at":"2016-07-21T11:05:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1902e9167da59a08049b62fd7156583e7b320ffd","assignee":{"login":"Pro100Andrey","id":1109916,"avatar_url":"https://avatars.githubusercontent.com/u/1109916?v=3","gravatar_id":"","url":"https://api.github.com/users/Pro100Andrey","html_url":"https://github.com/Pro100Andrey","followers_url":"https://api.github.com/users/Pro100Andrey/followers","following_url":"https://api.github.com/users/Pro100Andrey/following{/other_user}","gists_url":"https://api.github.com/users/Pro100Andrey/gists{/gist_id}","starred_url":"https://api.github.com/users/Pro100Andrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pro100Andrey/subscriptions","organizations_url":"https://api.github.com/users/Pro100Andrey/orgs","repos_url":"https://api.github.com/users/Pro100Andrey/repos","events_url":"https://api.github.com/users/Pro100Andrey/events{/privacy}","received_events_url":"https://api.github.com/users/Pro100Andrey/received_events","type":"User","site_admin":false},"assignees":[{"login":"Pro100Andrey","id":1109916,"avatar_url":"https://avatars.githubusercontent.com/u/1109916?v=3","gravatar_id":"","url":"https://api.github.com/users/Pro100Andrey","html_url":"https://github.com/Pro100Andrey","followers_url":"https://api.github.com/users/Pro100Andrey/followers","following_url":"https://api.github.com/users/Pro100Andrey/following{/other_user}","gists_url":"https://api.github.com/users/Pro100Andrey/gists{/gist_id}","starred_url":"https://api.github.com/users/Pro100Andrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pro100Andrey/subscriptions","organizations_url":"https://api.github.com/users/Pro100Andrey/orgs","repos_url":"https://api.github.com/users/Pro100Andrey/repos","events_url":"https://api.github.com/users/Pro100Andrey/events{/privacy}","received_events_url":"https://api.github.com/users/Pro100Andrey/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls/241/commits","review_comments_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls/241/comments","review_comment_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/issues/241/comments","statuses_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/statuses/4e5b2e1a48372abe56cff8614b9823f30792d042","head":{"label":"QuickBlox:feature/copy_images","ref":"feature/copy_images","sha":"4e5b2e1a48372abe56cff8614b9823f30792d042","user":{"login":"QuickBlox","id":1140234,"avatar_url":"https://avatars.githubusercontent.com/u/1140234?v=3","gravatar_id":"","url":"https://api.github.com/users/QuickBlox","html_url":"https://github.com/QuickBlox","followers_url":"https://api.github.com/users/QuickBlox/followers","following_url":"https://api.github.com/users/QuickBlox/following{/other_user}","gists_url":"https://api.github.com/users/QuickBlox/gists{/gist_id}","starred_url":"https://api.github.com/users/QuickBlox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuickBlox/subscriptions","organizations_url":"https://api.github.com/users/QuickBlox/orgs","repos_url":"https://api.github.com/users/QuickBlox/repos","events_url":"https://api.github.com/users/QuickBlox/events{/privacy}","received_events_url":"https://api.github.com/users/QuickBlox/received_events","type":"Organization","site_admin":false},"repo":{"id":33928671,"name":"q-municate-services-ios","full_name":"QuickBlox/q-municate-services-ios","owner":{"login":"QuickBlox","id":1140234,"avatar_url":"https://avatars.githubusercontent.com/u/1140234?v=3","gravatar_id":"","url":"https://api.github.com/users/QuickBlox","html_url":"https://github.com/QuickBlox","followers_url":"https://api.github.com/users/QuickBlox/followers","following_url":"https://api.github.com/users/QuickBlox/following{/other_user}","gists_url":"https://api.github.com/users/QuickBlox/gists{/gist_id}","starred_url":"https://api.github.com/users/QuickBlox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuickBlox/subscriptions","organizations_url":"https://api.github.com/users/QuickBlox/orgs","repos_url":"https://api.github.com/users/QuickBlox/repos","events_url":"https://api.github.com/users/QuickBlox/events{/privacy}","received_events_url":"https://api.github.com/users/QuickBlox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QuickBlox/q-municate-services-ios","description":"Easy-to-use services for Quickblox SDK, for speeding up development of iOS chat applications","fork":false,"url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios","forks_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/forks","keys_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/teams","hooks_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/hooks","issue_events_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/issues/events{/number}","events_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/events","assignees_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/assignees{/user}","branches_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/branches{/branch}","tags_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/tags","blobs_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/languages","stargazers_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/stargazers","contributors_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/contributors","subscribers_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/subscribers","subscription_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/subscription","commits_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/contents/{+path}","compare_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/merges","archive_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/downloads","issues_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/issues{/number}","pulls_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/labels{/name}","releases_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/releases{/id}","deployments_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/deployments","created_at":"2015-04-14T11:49:44Z","updated_at":"2016-06-28T12:26:42Z","pushed_at":"2016-07-20T15:05:15Z","git_url":"git://github.com/QuickBlox/q-municate-services-ios.git","ssh_url":"git@github.com:QuickBlox/q-municate-services-ios.git","clone_url":"https://github.com/QuickBlox/q-municate-services-ios.git","svn_url":"https://github.com/QuickBlox/q-municate-services-ios","homepage":"","size":17844,"stargazers_count":20,"watchers_count":20,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":9,"forks":20,"open_issues":9,"watchers":20,"default_branch":"master"}},"base":{"label":"QuickBlox:development","ref":"development","sha":"c23e6ed684e4ea66f3aff261fe4d45cf0971ff05","user":{"login":"QuickBlox","id":1140234,"avatar_url":"https://avatars.githubusercontent.com/u/1140234?v=3","gravatar_id":"","url":"https://api.github.com/users/QuickBlox","html_url":"https://github.com/QuickBlox","followers_url":"https://api.github.com/users/QuickBlox/followers","following_url":"https://api.github.com/users/QuickBlox/following{/other_user}","gists_url":"https://api.github.com/users/QuickBlox/gists{/gist_id}","starred_url":"https://api.github.com/users/QuickBlox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuickBlox/subscriptions","organizations_url":"https://api.github.com/users/QuickBlox/orgs","repos_url":"https://api.github.com/users/QuickBlox/repos","events_url":"https://api.github.com/users/QuickBlox/events{/privacy}","received_events_url":"https://api.github.com/users/QuickBlox/received_events","type":"Organization","site_admin":false},"repo":{"id":33928671,"name":"q-municate-services-ios","full_name":"QuickBlox/q-municate-services-ios","owner":{"login":"QuickBlox","id":1140234,"avatar_url":"https://avatars.githubusercontent.com/u/1140234?v=3","gravatar_id":"","url":"https://api.github.com/users/QuickBlox","html_url":"https://github.com/QuickBlox","followers_url":"https://api.github.com/users/QuickBlox/followers","following_url":"https://api.github.com/users/QuickBlox/following{/other_user}","gists_url":"https://api.github.com/users/QuickBlox/gists{/gist_id}","starred_url":"https://api.github.com/users/QuickBlox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuickBlox/subscriptions","organizations_url":"https://api.github.com/users/QuickBlox/orgs","repos_url":"https://api.github.com/users/QuickBlox/repos","events_url":"https://api.github.com/users/QuickBlox/events{/privacy}","received_events_url":"https://api.github.com/users/QuickBlox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QuickBlox/q-municate-services-ios","description":"Easy-to-use services for Quickblox SDK, for speeding up development of iOS chat applications","fork":false,"url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios","forks_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/forks","keys_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/teams","hooks_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/hooks","issue_events_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/issues/events{/number}","events_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/events","assignees_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/assignees{/user}","branches_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/branches{/branch}","tags_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/tags","blobs_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/languages","stargazers_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/stargazers","contributors_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/contributors","subscribers_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/subscribers","subscription_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/subscription","commits_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/contents/{+path}","compare_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/merges","archive_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/downloads","issues_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/issues{/number}","pulls_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/labels{/name}","releases_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/releases{/id}","deployments_url":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/deployments","created_at":"2015-04-14T11:49:44Z","updated_at":"2016-06-28T12:26:42Z","pushed_at":"2016-07-20T15:05:15Z","git_url":"git://github.com/QuickBlox/q-municate-services-ios.git","ssh_url":"git@github.com:QuickBlox/q-municate-services-ios.git","clone_url":"https://github.com/QuickBlox/q-municate-services-ios.git","svn_url":"https://github.com/QuickBlox/q-municate-services-ios","homepage":"","size":17844,"stargazers_count":20,"watchers_count":20,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":9,"forks":20,"open_issues":9,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls/241"},"html":{"href":"https://github.com/QuickBlox/q-municate-services-ios/pull/241"},"issue":{"href":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/issues/241"},"comments":{"href":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/issues/241/comments"},"review_comments":{"href":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls/241/comments"},"review_comment":{"href":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/pulls/241/commits"},"statuses":{"href":"https://api.github.com/repos/QuickBlox/q-municate-services-ios/statuses/4e5b2e1a48372abe56cff8614b9823f30792d042"}}}}
{"actor":{"display_login":"Pro100Andrey"}}