{"action":"created","issue":{"url":"https://api.github.com/repos/wireapp/wire-ios/issues/2806","repository_url":"https://api.github.com/repos/wireapp/wire-ios","labels_url":"https://api.github.com/repos/wireapp/wire-ios/issues/2806/labels{/name}","comments_url":"https://api.github.com/repos/wireapp/wire-ios/issues/2806/comments","events_url":"https://api.github.com/repos/wireapp/wire-ios/issues/2806/events","html_url":"https://github.com/wireapp/wire-ios/pull/2806","id":371446648,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzODkwMjY5","number":2806,"title":"ZIOS-10730: Fix email login prefill after logging in with phone","user":{"login":"alexaubry","id":16192914,"node_id":"MDQ6VXNlcjE2MTkyOTE0","avatar_url":"https://avatars2.githubusercontent.com/u/16192914?v=4","gravatar_id":"","url":"https://api.github.com/users/alexaubry","html_url":"https://github.com/alexaubry","followers_url":"https://api.github.com/users/alexaubry/followers","following_url":"https://api.github.com/users/alexaubry/following{/other_user}","gists_url":"https://api.github.com/users/alexaubry/gists{/gist_id}","starred_url":"https://api.github.com/users/alexaubry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexaubry/subscriptions","organizations_url":"https://api.github.com/users/alexaubry/orgs","repos_url":"https://api.github.com/users/alexaubry/repos","events_url":"https://api.github.com/users/alexaubry/events{/privacy}","received_events_url":"https://api.github.com/users/alexaubry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-18T09:45:51Z","updated_at":"2018-10-18T09:55:27Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/wireapp/wire-ios/pulls/2806","html_url":"https://github.com/wireapp/wire-ios/pull/2806","diff_url":"https://github.com/wireapp/wire-ios/pull/2806.diff","patch_url":"https://github.com/wireapp/wire-ios/pull/2806.patch"},"body":"## What's new in this PR?\r\n\r\n### Issues\r\n\r\nFollowing the login refactor, we identified two issues: \r\n\r\n1. When the user logs in with phone number but the account has an associated email, we didn't pre-fill the email.\r\n\r\n2. When the user cancels giving the passcode, we actually selected the same account that needs the passcode, so we ended up on the skeleton list and the user was stuck.\r\n\r\n### Causes / Solutions\r\n\r\n1. In the event handler for the needs password to register client error, we didn't use the error user info key to extract the login credentials \r\n\r\n2. When the user tapped the cancel button, we selected the first authenticated account, which is was in fact the account that could not be registered (it is authenticated, because it has an access token). Now, we look for the first authenticated account that has different credentials and switch to it."},"comment":{"url":"https://api.github.com/repos/wireapp/wire-ios/issues/comments/430948798","html_url":"https://github.com/wireapp/wire-ios/pull/2806#issuecomment-430948798","issue_url":"https://api.github.com/repos/wireapp/wire-ios/issues/2806","id":430948798,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDk0ODc5OA==","user":{"login":"codecov-io","id":8655789,"node_id":"MDQ6VXNlcjg2NTU3ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/8655789?v=4","gravatar_id":"","url":"https://api.github.com/users/codecov-io","html_url":"https://github.com/codecov-io","followers_url":"https://api.github.com/users/codecov-io/followers","following_url":"https://api.github.com/users/codecov-io/following{/other_user}","gists_url":"https://api.github.com/users/codecov-io/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov-io/subscriptions","organizations_url":"https://api.github.com/users/codecov-io/orgs","repos_url":"https://api.github.com/users/codecov-io/repos","events_url":"https://api.github.com/users/codecov-io/events{/privacy}","received_events_url":"https://api.github.com/users/codecov-io/received_events","type":"User","site_admin":false},"created_at":"2018-10-18T09:55:27Z","updated_at":"2018-10-18T09:55:27Z","author_association":"NONE","body":"# [Codecov](https://codecov.io/gh/wireapp/wire-ios/pull/2806?src=pr&el=h1) Report\n> Merging [#2806](https://codecov.io/gh/wireapp/wire-ios/pull/2806?src=pr&el=desc) into [develop](https://codecov.io/gh/wireapp/wire-ios/commit/362d4382b1564264dc95a5c0da2cd87f4a5b0f6f?src=pr&el=desc) will **increase** coverage by `<.01%`.\n> The diff coverage is `40%`.\n\n\n```diff\n@@             Coverage Diff             @@\n##           develop    #2806      +/-   ##\n===========================================\n+ Coverage    48.24%   48.24%   +<.01%     \n===========================================\n  Files          864      864              \n  Lines        45896    45907      +11     \n===========================================\n+ Hits         22142    22148       +6     \n- Misses       23754    23759       +5\n```\n"}}
{"actor":{"display_login":"codecov-io"}}