{"action":"created","comment":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls/comments/198832912","pull_request_review_id":132831522,"id":198832912,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODgzMjkxMg==","diff_hunk":"@@ -216,9 +224,51 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR\n     override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {\n         if (requestCode == REQUEST_CODE_FOR_PERFORM_SAF && resultCode == Activity.RESULT_OK) {\n             if (resultData != null) {\n-                uploadFile(resultData.data)\n+                fileAttachmentDialog(resultData.data)\n+            }\n+        }\n+    }\n+\n+    private fun fileAttachmentDialog(data: Uri) {\n+        val builder = AlertDialog.Builder(activity)\n+        val dialogView = View.inflate(context, R.layout.file_attachments_dialog, null)\n+        builder.setView(dialogView)\n+        val alertDialog = builder.create()\n+\n+        dialogView?.let {\n+            val imagePreview: ImageView = it.findViewById(R.id.image_preview)","path":"app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt","position":46,"original_position":46,"commit_id":"d3ec6de1061655a30ebd5279356d6fc4170e9d21","original_commit_id":"d3ec6de1061655a30ebd5279356d6fc4170e9d21","user":{"login":"luciofm","id":224255,"node_id":"MDQ6VXNlcjIyNDI1NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/224255?v=4","gravatar_id":"","url":"https://api.github.com/users/luciofm","html_url":"https://github.com/luciofm","followers_url":"https://api.github.com/users/luciofm/followers","following_url":"https://api.github.com/users/luciofm/following{/other_user}","gists_url":"https://api.github.com/users/luciofm/gists{/gist_id}","starred_url":"https://api.github.com/users/luciofm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luciofm/subscriptions","organizations_url":"https://api.github.com/users/luciofm/orgs","repos_url":"https://api.github.com/users/luciofm/repos","events_url":"https://api.github.com/users/luciofm/events{/privacy}","received_events_url":"https://api.github.com/users/luciofm/received_events","type":"User","site_admin":false},"body":"Don't need to change, but a more Kotlin idiomatic syntax would be:\r\n`val imagePreview = it.findViewById<ImageView>(R.id.image_preview)`","created_at":"2018-06-28T13:08:14Z","updated_at":"2018-06-28T13:10:53Z","html_url":"https://github.com/RocketChat/Rocket.Chat.Android/pull/1387#discussion_r198832912","pull_request_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls/1387","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls/comments/198832912"},"html":{"href":"https://github.com/RocketChat/Rocket.Chat.Android/pull/1387#discussion_r198832912"},"pull_request":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls/1387"}}},"pull_request":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls/1387","id":195597351,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NTk3MzUx","html_url":"https://github.com/RocketChat/Rocket.Chat.Android/pull/1387","diff_url":"https://github.com/RocketChat/Rocket.Chat.Android/pull/1387.diff","patch_url":"https://github.com/RocketChat/Rocket.Chat.Android/pull/1387.patch","issue_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/issues/1387","number":1387,"state":"open","locked":false,"title":"[NEW] Send message with attachments","user":{"login":"divyanshub024","id":16731434,"node_id":"MDQ6VXNlcjE2NzMxNDM0","avatar_url":"https://avatars3.githubusercontent.com/u/16731434?v=4","gravatar_id":"","url":"https://api.github.com/users/divyanshub024","html_url":"https://github.com/divyanshub024","followers_url":"https://api.github.com/users/divyanshub024/followers","following_url":"https://api.github.com/users/divyanshub024/following{/other_user}","gists_url":"https://api.github.com/users/divyanshub024/gists{/gist_id}","starred_url":"https://api.github.com/users/divyanshub024/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divyanshub024/subscriptions","organizations_url":"https://api.github.com/users/divyanshub024/orgs","repos_url":"https://api.github.com/users/divyanshub024/repos","events_url":"https://api.github.com/users/divyanshub024/events{/privacy}","received_events_url":"https://api.github.com/users/divyanshub024/received_events","type":"User","site_admin":false},"body":"<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->\r\n@RocketChat/android\r\n\r\n<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->\r\nCloses #944 \r\n\r\n<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->\r\n- Image\r\n\r\n<img src = \"https://user-images.githubusercontent.com/16731434/41552037-3dc79152-734b-11e8-8cbc-b02ba09ae282.png\" width = \"320\"/>\r\n\r\n- Video\r\n<img src = \"https://user-images.githubusercontent.com/16731434/41552038-3e1146bc-734b-11e8-9fcb-504e45772022.png\" width = \"320\"/>\r\n\r\n- File\r\n<img src = \"https://user-images.githubusercontent.com/16731434/41552040-3e5eed7c-734b-11e8-9bc8-3cb642951153.png\" width = \"320\"/>\r\n","created_at":"2018-06-18T17:36:24Z","updated_at":"2018-06-28T13:10:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d050827160c6b8487b082e969bc8ede3ae24fb8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls/1387/commits","review_comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls/1387/comments","review_comment_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/issues/1387/comments","statuses_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/statuses/d3ec6de1061655a30ebd5279356d6fc4170e9d21","head":{"label":"divyanshub024:send-msg-attachments","ref":"send-msg-attachments","sha":"d3ec6de1061655a30ebd5279356d6fc4170e9d21","user":{"login":"divyanshub024","id":16731434,"node_id":"MDQ6VXNlcjE2NzMxNDM0","avatar_url":"https://avatars3.githubusercontent.com/u/16731434?v=4","gravatar_id":"","url":"https://api.github.com/users/divyanshub024","html_url":"https://github.com/divyanshub024","followers_url":"https://api.github.com/users/divyanshub024/followers","following_url":"https://api.github.com/users/divyanshub024/following{/other_user}","gists_url":"https://api.github.com/users/divyanshub024/gists{/gist_id}","starred_url":"https://api.github.com/users/divyanshub024/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divyanshub024/subscriptions","organizations_url":"https://api.github.com/users/divyanshub024/orgs","repos_url":"https://api.github.com/users/divyanshub024/repos","events_url":"https://api.github.com/users/divyanshub024/events{/privacy}","received_events_url":"https://api.github.com/users/divyanshub024/received_events","type":"User","site_admin":false},"repo":{"id":127454354,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc0NTQzNTQ=","name":"Rocket.Chat.Android","full_name":"divyanshub024/Rocket.Chat.Android","owner":{"login":"divyanshub024","id":16731434,"node_id":"MDQ6VXNlcjE2NzMxNDM0","avatar_url":"https://avatars3.githubusercontent.com/u/16731434?v=4","gravatar_id":"","url":"https://api.github.com/users/divyanshub024","html_url":"https://github.com/divyanshub024","followers_url":"https://api.github.com/users/divyanshub024/followers","following_url":"https://api.github.com/users/divyanshub024/following{/other_user}","gists_url":"https://api.github.com/users/divyanshub024/gists{/gist_id}","starred_url":"https://api.github.com/users/divyanshub024/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divyanshub024/subscriptions","organizations_url":"https://api.github.com/users/divyanshub024/orgs","repos_url":"https://api.github.com/users/divyanshub024/repos","events_url":"https://api.github.com/users/divyanshub024/events{/privacy}","received_events_url":"https://api.github.com/users/divyanshub024/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/divyanshub024/Rocket.Chat.Android","description":"Rocket.Chat Native Android Application","fork":true,"url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android","forks_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/forks","keys_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/teams","hooks_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/hooks","issue_events_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/issues/events{/number}","events_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/events","assignees_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/assignees{/user}","branches_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/branches{/branch}","tags_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/tags","blobs_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/statuses/{sha}","languages_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/languages","stargazers_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/stargazers","contributors_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/contributors","subscribers_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/subscribers","subscription_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/subscription","commits_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/contents/{+path}","compare_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/merges","archive_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/downloads","issues_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/issues{/number}","pulls_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/pulls{/number}","milestones_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/milestones{/number}","notifications_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/labels{/name}","releases_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/releases{/id}","deployments_url":"https://api.github.com/repos/divyanshub024/Rocket.Chat.Android/deployments","created_at":"2018-03-30T17:21:51Z","updated_at":"2018-06-27T19:01:02Z","pushed_at":"2018-06-28T12:41:23Z","git_url":"git://github.com/divyanshub024/Rocket.Chat.Android.git","ssh_url":"git@github.com:divyanshub024/Rocket.Chat.Android.git","clone_url":"https://github.com/divyanshub024/Rocket.Chat.Android.git","svn_url":"https://github.com/divyanshub024/Rocket.Chat.Android","homepage":"https://rocket.chat","size":14441,"stargazers_count":0,"watchers_count":0,"language":"Kotlin","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop-2.x"}},"base":{"label":"RocketChat:develop","ref":"develop","sha":"847d6e6f1bd6c0ee704ce00145bd5304e77015a4","user":{"login":"RocketChat","id":12508788,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTA4Nzg4","avatar_url":"https://avatars1.githubusercontent.com/u/12508788?v=4","gravatar_id":"","url":"https://api.github.com/users/RocketChat","html_url":"https://github.com/RocketChat","followers_url":"https://api.github.com/users/RocketChat/followers","following_url":"https://api.github.com/users/RocketChat/following{/other_user}","gists_url":"https://api.github.com/users/RocketChat/gists{/gist_id}","starred_url":"https://api.github.com/users/RocketChat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RocketChat/subscriptions","organizations_url":"https://api.github.com/users/RocketChat/orgs","repos_url":"https://api.github.com/users/RocketChat/repos","events_url":"https://api.github.com/users/RocketChat/events{/privacy}","received_events_url":"https://api.github.com/users/RocketChat/received_events","type":"Organization","site_admin":false},"repo":{"id":48179404,"node_id":"MDEwOlJlcG9zaXRvcnk0ODE3OTQwNA==","name":"Rocket.Chat.Android","full_name":"RocketChat/Rocket.Chat.Android","owner":{"login":"RocketChat","id":12508788,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTA4Nzg4","avatar_url":"https://avatars1.githubusercontent.com/u/12508788?v=4","gravatar_id":"","url":"https://api.github.com/users/RocketChat","html_url":"https://github.com/RocketChat","followers_url":"https://api.github.com/users/RocketChat/followers","following_url":"https://api.github.com/users/RocketChat/following{/other_user}","gists_url":"https://api.github.com/users/RocketChat/gists{/gist_id}","starred_url":"https://api.github.com/users/RocketChat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RocketChat/subscriptions","organizations_url":"https://api.github.com/users/RocketChat/orgs","repos_url":"https://api.github.com/users/RocketChat/repos","events_url":"https://api.github.com/users/RocketChat/events{/privacy}","received_events_url":"https://api.github.com/users/RocketChat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RocketChat/Rocket.Chat.Android","description":"Rocket.Chat Native Android Application","fork":false,"url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android","forks_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/forks","keys_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/teams","hooks_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/hooks","issue_events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/issues/events{/number}","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/events","assignees_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/assignees{/user}","branches_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/branches{/branch}","tags_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/tags","blobs_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/statuses/{sha}","languages_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/languages","stargazers_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/stargazers","contributors_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/contributors","subscribers_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/subscribers","subscription_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/subscription","commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/contents/{+path}","compare_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/merges","archive_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/downloads","issues_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/issues{/number}","pulls_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls{/number}","milestones_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/milestones{/number}","notifications_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/labels{/name}","releases_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/releases{/id}","deployments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/deployments","created_at":"2015-12-17T14:36:45Z","updated_at":"2018-06-27T14:40:38Z","pushed_at":"2018-06-28T12:41:25Z","git_url":"git://github.com/RocketChat/Rocket.Chat.Android.git","ssh_url":"git@github.com:RocketChat/Rocket.Chat.Android.git","clone_url":"https://github.com/RocketChat/Rocket.Chat.Android.git","svn_url":"https://github.com/RocketChat/Rocket.Chat.Android","homepage":"https://rocket.chat","size":13704,"stargazers_count":428,"watchers_count":428,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":310,"mirror_url":null,"archived":false,"open_issues_count":158,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":310,"open_issues":158,"watchers":428,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls/1387"},"html":{"href":"https://github.com/RocketChat/Rocket.Chat.Android/pull/1387"},"issue":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/issues/1387"},"comments":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/issues/1387/comments"},"review_comments":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls/1387/comments"},"review_comment":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/pulls/1387/commits"},"statuses":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.Android/statuses/d3ec6de1061655a30ebd5279356d6fc4170e9d21"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"luciofm"}}