Register Input Handling

I had some trouble with the registration..
Quickly checked TextSecure Server API and found the problems:
number has to be valid PSTN. (Including regionCode, precisely what validateNumber() returns)
verificationCode has to be all numbers, no dashes or spaces

Closes #193
This commit is contained in:
Florian Groh 2015-03-11 00:07:01 +01:00 committed by lilia
parent 0ac323961b
commit 617b7686f7

View file

@ -81,8 +81,8 @@
$('#form').submit(function(e) {
e.preventDefault();
log('registering');
var number = $('input.number').val();
var verificationCode = $('#code').val();
var number = phoneView.validateNumber();
var verificationCode = $('#code').val().replace(/\D+/g, "");
var signalingKey = textsecure.crypto.getRandomBytes(32 + 20);
var password = btoa(getString(textsecure.crypto.getRandomBytes(16)));