{"action":"created","comment":{"url":"https://api.github.com/repos/Qabel/qabel-android/pulls/comments/68500663","id":68500663,"diff_hunk":"@@ -87,8 +94,30 @@ class MainContactsUseCase @Inject constructor(val identity: Identity,\n                 //Ignore\n             }\n         }\n-        subscriber.onNext(Pair(importedContacts, contacts.size - importedContacts));\n+        subscriber.onNext(ContactsParseResult(importedContacts, contacts.size - importedContacts));\n         subscriber.onCompleted();\n     }\n \n+    override fun importContactString(contactString: String)= observable<ContactParseResult> {\n+        subscriber ->\n+        val result = contactString.split(\"\\\\r?\\\\n\".toRegex());\n+        if (result.size == 4 && result[0] == \"QABELCONTACT\") {\n+            val dropURL = DropURL(result[2])\n+            val dropURLs = ArrayList<DropURL>()\n+            dropURLs.add(dropURL)\n+            val publicKey = QblECPublicKey(Hex.decode(result[3]))\n+            val contact = Contact(result[1], dropURLs, publicKey)\n+            var success = true;\n+            try {\n+                contactRepository.save(contact, identity)\n+            } catch(ex: QblStorageEntityExistsException) {\n+                success = false;\n+            }\n+            subscriber.onNext(ContactParseResult(contact, success));\n+            subscriber.onCompleted();\n+        } else {\n+            throw QblStorageException(\"Invalid contact String\");","path":"qabelbox/src/main/java/de/qabel/qabelbox/contacts/interactor/MainContactsUseCase.kt","position":null,"original_position":63,"commit_id":"2dd68c88e696eaf339cd47bd9db92899abbfd56a","original_commit_id":"12fd910b569b95456611745c67aab9676e28ec9e","user":{"login":"audax","id":858339,"avatar_url":"https://avatars.githubusercontent.com/u/858339?v=3","gravatar_id":"","url":"https://api.github.com/users/audax","html_url":"https://github.com/audax","followers_url":"https://api.github.com/users/audax/followers","following_url":"https://api.github.com/users/audax/following{/other_user}","gists_url":"https://api.github.com/users/audax/gists{/gist_id}","starred_url":"https://api.github.com/users/audax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/audax/subscriptions","organizations_url":"https://api.github.com/users/audax/orgs","repos_url":"https://api.github.com/users/audax/repos","events_url":"https://api.github.com/users/audax/events{/privacy}","received_events_url":"https://api.github.com/users/audax/received_events","type":"User","site_admin":false},"body":"wouldn't this be in subscribe.onError() ?","created_at":"2016-06-26T10:10:25Z","updated_at":"2016-06-26T10:10:25Z","html_url":"https://github.com/Qabel/qabel-android/pull/573#discussion_r68500663","pull_request_url":"https://api.github.com/repos/Qabel/qabel-android/pulls/573","_links":{"self":{"href":"https://api.github.com/repos/Qabel/qabel-android/pulls/comments/68500663"},"html":{"href":"https://github.com/Qabel/qabel-android/pull/573#discussion_r68500663"},"pull_request":{"href":"https://api.github.com/repos/Qabel/qabel-android/pulls/573"}}},"pull_request":{"url":"https://api.github.com/repos/Qabel/qabel-android/pulls/573","id":74375475,"html_url":"https://github.com/Qabel/qabel-android/pull/573","diff_url":"https://github.com/Qabel/qabel-android/pull/573.diff","patch_url":"https://github.com/Qabel/qabel-android/pull/573.patch","issue_url":"https://api.github.com/repos/Qabel/qabel-android/issues/573","number":573,"state":"open","locked":false,"title":"Adressbook","user":{"login":"JoGir","id":16522130,"avatar_url":"https://avatars.githubusercontent.com/u/16522130?v=3","gravatar_id":"","url":"https://api.github.com/users/JoGir","html_url":"https://github.com/JoGir","followers_url":"https://api.github.com/users/JoGir/followers","following_url":"https://api.github.com/users/JoGir/following{/other_user}","gists_url":"https://api.github.com/users/JoGir/gists{/gist_id}","starred_url":"https://api.github.com/users/JoGir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoGir/subscriptions","organizations_url":"https://api.github.com/users/JoGir/orgs","repos_url":"https://api.github.com/users/JoGir/repos","events_url":"https://api.github.com/users/JoGir/events{/privacy}","received_events_url":"https://api.github.com/users/JoGir/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-19T22:05:47Z","updated_at":"2016-06-26T10:10:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f04213613b28825ecf60830284f35f9b0306d011","assignee":{"login":"audax","id":858339,"avatar_url":"https://avatars.githubusercontent.com/u/858339?v=3","gravatar_id":"","url":"https://api.github.com/users/audax","html_url":"https://github.com/audax","followers_url":"https://api.github.com/users/audax/followers","following_url":"https://api.github.com/users/audax/following{/other_user}","gists_url":"https://api.github.com/users/audax/gists{/gist_id}","starred_url":"https://api.github.com/users/audax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/audax/subscriptions","organizations_url":"https://api.github.com/users/audax/orgs","repos_url":"https://api.github.com/users/audax/repos","events_url":"https://api.github.com/users/audax/events{/privacy}","received_events_url":"https://api.github.com/users/audax/received_events","type":"User","site_admin":false},"assignees":[{"login":"audax","id":858339,"avatar_url":"https://avatars.githubusercontent.com/u/858339?v=3","gravatar_id":"","url":"https://api.github.com/users/audax","html_url":"https://github.com/audax","followers_url":"https://api.github.com/users/audax/followers","following_url":"https://api.github.com/users/audax/following{/other_user}","gists_url":"https://api.github.com/users/audax/gists{/gist_id}","starred_url":"https://api.github.com/users/audax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/audax/subscriptions","organizations_url":"https://api.github.com/users/audax/orgs","repos_url":"https://api.github.com/users/audax/repos","events_url":"https://api.github.com/users/audax/events{/privacy}","received_events_url":"https://api.github.com/users/audax/received_events","type":"User","site_admin":false},{"login":"julianseeger","id":3258762,"avatar_url":"https://avatars.githubusercontent.com/u/3258762?v=3","gravatar_id":"","url":"https://api.github.com/users/julianseeger","html_url":"https://github.com/julianseeger","followers_url":"https://api.github.com/users/julianseeger/followers","following_url":"https://api.github.com/users/julianseeger/following{/other_user}","gists_url":"https://api.github.com/users/julianseeger/gists{/gist_id}","starred_url":"https://api.github.com/users/julianseeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julianseeger/subscriptions","organizations_url":"https://api.github.com/users/julianseeger/orgs","repos_url":"https://api.github.com/users/julianseeger/repos","events_url":"https://api.github.com/users/julianseeger/events{/privacy}","received_events_url":"https://api.github.com/users/julianseeger/received_events","type":"User","site_admin":false},{"login":"JoGir","id":16522130,"avatar_url":"https://avatars.githubusercontent.com/u/16522130?v=3","gravatar_id":"","url":"https://api.github.com/users/JoGir","html_url":"https://github.com/JoGir","followers_url":"https://api.github.com/users/JoGir/followers","following_url":"https://api.github.com/users/JoGir/following{/other_user}","gists_url":"https://api.github.com/users/JoGir/gists{/gist_id}","starred_url":"https://api.github.com/users/JoGir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoGir/subscriptions","organizations_url":"https://api.github.com/users/JoGir/orgs","repos_url":"https://api.github.com/users/JoGir/repos","events_url":"https://api.github.com/users/JoGir/events{/privacy}","received_events_url":"https://api.github.com/users/JoGir/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Qabel/qabel-android/milestones/16","html_url":"https://github.com/Qabel/qabel-android/milestones/RC","labels_url":"https://api.github.com/repos/Qabel/qabel-android/milestones/16/labels","id":1716388,"number":16,"title":"RC","description":"","creator":{"login":"jmt85","id":4853105,"avatar_url":"https://avatars.githubusercontent.com/u/4853105?v=3","gravatar_id":"","url":"https://api.github.com/users/jmt85","html_url":"https://github.com/jmt85","followers_url":"https://api.github.com/users/jmt85/followers","following_url":"https://api.github.com/users/jmt85/following{/other_user}","gists_url":"https://api.github.com/users/jmt85/gists{/gist_id}","starred_url":"https://api.github.com/users/jmt85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmt85/subscriptions","organizations_url":"https://api.github.com/users/jmt85/orgs","repos_url":"https://api.github.com/users/jmt85/repos","events_url":"https://api.github.com/users/jmt85/events{/privacy}","received_events_url":"https://api.github.com/users/jmt85/received_events","type":"User","site_admin":false},"open_issues":34,"closed_issues":29,"state":"open","created_at":"2016-04-19T07:34:54Z","updated_at":"2016-06-19T22:05:47Z","due_on":"2016-08-11T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Qabel/qabel-android/pulls/573/commits","review_comments_url":"https://api.github.com/repos/Qabel/qabel-android/pulls/573/comments","review_comment_url":"https://api.github.com/repos/Qabel/qabel-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Qabel/qabel-android/issues/573/comments","statuses_url":"https://api.github.com/repos/Qabel/qabel-android/statuses/2dd68c88e696eaf339cd47bd9db92899abbfd56a","head":{"label":"JoGir:abook","ref":"abook","sha":"2dd68c88e696eaf339cd47bd9db92899abbfd56a","user":{"login":"JoGir","id":16522130,"avatar_url":"https://avatars.githubusercontent.com/u/16522130?v=3","gravatar_id":"","url":"https://api.github.com/users/JoGir","html_url":"https://github.com/JoGir","followers_url":"https://api.github.com/users/JoGir/followers","following_url":"https://api.github.com/users/JoGir/following{/other_user}","gists_url":"https://api.github.com/users/JoGir/gists{/gist_id}","starred_url":"https://api.github.com/users/JoGir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoGir/subscriptions","organizations_url":"https://api.github.com/users/JoGir/orgs","repos_url":"https://api.github.com/users/JoGir/repos","events_url":"https://api.github.com/users/JoGir/events{/privacy}","received_events_url":"https://api.github.com/users/JoGir/received_events","type":"User","site_admin":false},"repo":{"id":53146477,"name":"qabel-android","full_name":"JoGir/qabel-android","owner":{"login":"JoGir","id":16522130,"avatar_url":"https://avatars.githubusercontent.com/u/16522130?v=3","gravatar_id":"","url":"https://api.github.com/users/JoGir","html_url":"https://github.com/JoGir","followers_url":"https://api.github.com/users/JoGir/followers","following_url":"https://api.github.com/users/JoGir/following{/other_user}","gists_url":"https://api.github.com/users/JoGir/gists{/gist_id}","starred_url":"https://api.github.com/users/JoGir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoGir/subscriptions","organizations_url":"https://api.github.com/users/JoGir/orgs","repos_url":"https://api.github.com/users/JoGir/repos","events_url":"https://api.github.com/users/JoGir/events{/privacy}","received_events_url":"https://api.github.com/users/JoGir/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JoGir/qabel-android","description":"Android Frontend of Qabel","fork":true,"url":"https://api.github.com/repos/JoGir/qabel-android","forks_url":"https://api.github.com/repos/JoGir/qabel-android/forks","keys_url":"https://api.github.com/repos/JoGir/qabel-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JoGir/qabel-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JoGir/qabel-android/teams","hooks_url":"https://api.github.com/repos/JoGir/qabel-android/hooks","issue_events_url":"https://api.github.com/repos/JoGir/qabel-android/issues/events{/number}","events_url":"https://api.github.com/repos/JoGir/qabel-android/events","assignees_url":"https://api.github.com/repos/JoGir/qabel-android/assignees{/user}","branches_url":"https://api.github.com/repos/JoGir/qabel-android/branches{/branch}","tags_url":"https://api.github.com/repos/JoGir/qabel-android/tags","blobs_url":"https://api.github.com/repos/JoGir/qabel-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JoGir/qabel-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JoGir/qabel-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/JoGir/qabel-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JoGir/qabel-android/statuses/{sha}","languages_url":"https://api.github.com/repos/JoGir/qabel-android/languages","stargazers_url":"https://api.github.com/repos/JoGir/qabel-android/stargazers","contributors_url":"https://api.github.com/repos/JoGir/qabel-android/contributors","subscribers_url":"https://api.github.com/repos/JoGir/qabel-android/subscribers","subscription_url":"https://api.github.com/repos/JoGir/qabel-android/subscription","commits_url":"https://api.github.com/repos/JoGir/qabel-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/JoGir/qabel-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/JoGir/qabel-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/JoGir/qabel-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/JoGir/qabel-android/contents/{+path}","compare_url":"https://api.github.com/repos/JoGir/qabel-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JoGir/qabel-android/merges","archive_url":"https://api.github.com/repos/JoGir/qabel-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JoGir/qabel-android/downloads","issues_url":"https://api.github.com/repos/JoGir/qabel-android/issues{/number}","pulls_url":"https://api.github.com/repos/JoGir/qabel-android/pulls{/number}","milestones_url":"https://api.github.com/repos/JoGir/qabel-android/milestones{/number}","notifications_url":"https://api.github.com/repos/JoGir/qabel-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JoGir/qabel-android/labels{/name}","releases_url":"https://api.github.com/repos/JoGir/qabel-android/releases{/id}","deployments_url":"https://api.github.com/repos/JoGir/qabel-android/deployments","created_at":"2016-03-04T15:50:34Z","updated_at":"2016-03-04T15:50:35Z","pushed_at":"2016-06-24T20:24:42Z","git_url":"git://github.com/JoGir/qabel-android.git","ssh_url":"git@github.com:JoGir/qabel-android.git","clone_url":"https://github.com/JoGir/qabel-android.git","svn_url":"https://github.com/JoGir/qabel-android","homepage":"","size":7342,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"Qabel:master","ref":"master","sha":"85c8ee0d5b7525ac131b0b06e7e99fa92b16beb8","user":{"login":"Qabel","id":7711470,"avatar_url":"https://avatars.githubusercontent.com/u/7711470?v=3","gravatar_id":"","url":"https://api.github.com/users/Qabel","html_url":"https://github.com/Qabel","followers_url":"https://api.github.com/users/Qabel/followers","following_url":"https://api.github.com/users/Qabel/following{/other_user}","gists_url":"https://api.github.com/users/Qabel/gists{/gist_id}","starred_url":"https://api.github.com/users/Qabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qabel/subscriptions","organizations_url":"https://api.github.com/users/Qabel/orgs","repos_url":"https://api.github.com/users/Qabel/repos","events_url":"https://api.github.com/users/Qabel/events{/privacy}","received_events_url":"https://api.github.com/users/Qabel/received_events","type":"Organization","site_admin":false},"repo":{"id":37848561,"name":"qabel-android","full_name":"Qabel/qabel-android","owner":{"login":"Qabel","id":7711470,"avatar_url":"https://avatars.githubusercontent.com/u/7711470?v=3","gravatar_id":"","url":"https://api.github.com/users/Qabel","html_url":"https://github.com/Qabel","followers_url":"https://api.github.com/users/Qabel/followers","following_url":"https://api.github.com/users/Qabel/following{/other_user}","gists_url":"https://api.github.com/users/Qabel/gists{/gist_id}","starred_url":"https://api.github.com/users/Qabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qabel/subscriptions","organizations_url":"https://api.github.com/users/Qabel/orgs","repos_url":"https://api.github.com/users/Qabel/repos","events_url":"https://api.github.com/users/Qabel/events{/privacy}","received_events_url":"https://api.github.com/users/Qabel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Qabel/qabel-android","description":":iphone: Android frontend of Qabel","fork":false,"url":"https://api.github.com/repos/Qabel/qabel-android","forks_url":"https://api.github.com/repos/Qabel/qabel-android/forks","keys_url":"https://api.github.com/repos/Qabel/qabel-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Qabel/qabel-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Qabel/qabel-android/teams","hooks_url":"https://api.github.com/repos/Qabel/qabel-android/hooks","issue_events_url":"https://api.github.com/repos/Qabel/qabel-android/issues/events{/number}","events_url":"https://api.github.com/repos/Qabel/qabel-android/events","assignees_url":"https://api.github.com/repos/Qabel/qabel-android/assignees{/user}","branches_url":"https://api.github.com/repos/Qabel/qabel-android/branches{/branch}","tags_url":"https://api.github.com/repos/Qabel/qabel-android/tags","blobs_url":"https://api.github.com/repos/Qabel/qabel-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Qabel/qabel-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Qabel/qabel-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/Qabel/qabel-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Qabel/qabel-android/statuses/{sha}","languages_url":"https://api.github.com/repos/Qabel/qabel-android/languages","stargazers_url":"https://api.github.com/repos/Qabel/qabel-android/stargazers","contributors_url":"https://api.github.com/repos/Qabel/qabel-android/contributors","subscribers_url":"https://api.github.com/repos/Qabel/qabel-android/subscribers","subscription_url":"https://api.github.com/repos/Qabel/qabel-android/subscription","commits_url":"https://api.github.com/repos/Qabel/qabel-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/Qabel/qabel-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/Qabel/qabel-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/Qabel/qabel-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/Qabel/qabel-android/contents/{+path}","compare_url":"https://api.github.com/repos/Qabel/qabel-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Qabel/qabel-android/merges","archive_url":"https://api.github.com/repos/Qabel/qabel-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Qabel/qabel-android/downloads","issues_url":"https://api.github.com/repos/Qabel/qabel-android/issues{/number}","pulls_url":"https://api.github.com/repos/Qabel/qabel-android/pulls{/number}","milestones_url":"https://api.github.com/repos/Qabel/qabel-android/milestones{/number}","notifications_url":"https://api.github.com/repos/Qabel/qabel-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Qabel/qabel-android/labels{/name}","releases_url":"https://api.github.com/repos/Qabel/qabel-android/releases{/id}","deployments_url":"https://api.github.com/repos/Qabel/qabel-android/deployments","created_at":"2015-06-22T10:05:20Z","updated_at":"2016-06-10T13:19:30Z","pushed_at":"2016-06-24T20:24:42Z","git_url":"git://github.com/Qabel/qabel-android.git","ssh_url":"git@github.com:Qabel/qabel-android.git","clone_url":"https://github.com/Qabel/qabel-android.git","svn_url":"https://github.com/Qabel/qabel-android","homepage":"","size":7764,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":84,"forks":14,"open_issues":84,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Qabel/qabel-android/pulls/573"},"html":{"href":"https://github.com/Qabel/qabel-android/pull/573"},"issue":{"href":"https://api.github.com/repos/Qabel/qabel-android/issues/573"},"comments":{"href":"https://api.github.com/repos/Qabel/qabel-android/issues/573/comments"},"review_comments":{"href":"https://api.github.com/repos/Qabel/qabel-android/pulls/573/comments"},"review_comment":{"href":"https://api.github.com/repos/Qabel/qabel-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Qabel/qabel-android/pulls/573/commits"},"statuses":{"href":"https://api.github.com/repos/Qabel/qabel-android/statuses/2dd68c88e696eaf339cd47bd9db92899abbfd56a"}}}}
{"actor":{"display_login":"audax"}}