Skip to content

Commit

Permalink
Fixed detected CC for North America
Browse files Browse the repository at this point in the history
  • Loading branch information
shirioko committed Aug 27, 2013
1 parent 2d87112 commit 52e3b99
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions WhatsAppApi/Parser/PhoneNumber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public PhoneNumber(string number)
{
//matched
this.Country = values[0].Trim(new char[] { '"' });
//hook: Fix CC for North America
if (values[1].StartsWith("1"))
{
values[1] = "1";
}
this.CC = values[1];
this.Number = number.Substring(this.CC.Length);
this.ISO3166 = values[3].Trim(new char[] { '"' });
Expand Down

0 comments on commit 52e3b99

Please sign in to comment.