Canonicalize recipient addresses

This commit is contained in:
AsamK 2015-07-07 11:42:24 +02:00
parent 0a7a6a5c54
commit 960e97bc12
2 changed files with 14 additions and 4 deletions

View file

@ -206,4 +206,14 @@ public class Manager {
messagePipe.shutdown();
}
}
public String canonicalizeNumber(String number) throws InvalidNumberException {
String localNumber = username;
return PhoneNumberFormatter.formatNumber(number, localNumber);
}
protected TextSecureAddress getPushAddress(String number) throws InvalidNumberException {
String e164number = canonicalizeNumber(number);
return new TextSecureAddress(e164number);
}
}