One more tiny error refactor

This commit is contained in:
Matt Corallo 2014-05-27 21:35:37 +02:00
parent 68131a6e2a
commit 56433bd9af
2 changed files with 8 additions and 13 deletions

View file

@ -59,12 +59,13 @@ $('#init-go-single-client').click(function() {
single_device = true;
textsecure.api.requestVerificationCode(number,
function(response) { },
function(code) {
alert("Failed to send key?" + code); //TODO
}
);
textsecure.api.requestVerificationCode(number).catch(function(error) {
//TODO: No alerts
if (error.humanReadable)
alert(error.humanReadable);
else
alert(error); // XXX
});
});
$('#init-go').click(function() {