Skip to content

Commit

Permalink
Updated code to build with new V2 Reg code
Browse files Browse the repository at this point in the history
  • Loading branch information
shirioko committed Aug 21, 2013
1 parent 5367c7f commit fc7f5f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion WhatsAppPort/frmRegister.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private void btnCodeRequest_Click(object sender, EventArgs e)
this.number = this.txtPhoneNumber.Text;
this.cc = this.number.Substring(0, 2);
this.phone = this.number.Substring(2);
if (WhatsAppApi.Register.WhatsRegisterV2.RequestCode(this.cc, this.phone, method))
if (WhatsAppApi.Register.WhatsRegisterV2.RequestCode(this.cc, this.phone, out this.password, method))
{
this.grpStep1.Enabled = false;
this.grpStep2.Enabled = true;
Expand Down
6 changes: 3 additions & 3 deletions WhatsTest/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ private static void RegisterAccount()
string countryCode = Console.ReadLine();
Console.Write("Phonenumber (ex. 650568134): ");
string phoneNumber = Console.ReadLine();

if (!WhatsRegisterV2.RequestCode(countryCode, phoneNumber))
string password = null;
if (!WhatsRegisterV2.RequestCode(countryCode, phoneNumber, out password))
return;
Console.Write("Enter received code: ");
string tmpCode = Console.ReadLine();

string password = WhatsRegisterV2.RegisterCode(countryCode, phoneNumber, tmpCode);
password = WhatsRegisterV2.RegisterCode(countryCode, phoneNumber, tmpCode);
if (String.IsNullOrEmpty(password))
{
Console.WriteLine("Error registering code");
Expand Down

0 comments on commit fc7f5f6

Please sign in to comment.