Make delivery receipts work correctly for groups.

This commit is contained in:
Moxie Marlinspike
2014-10-20 21:06:34 -07:00
parent 18b0601990
commit b568ce70b2
3 changed files with 42 additions and 29 deletions

View File

@@ -134,6 +134,13 @@ public class Util {
return PhoneNumberFormatter.formatNumber(number, localNumber);
}
public static String canonicalizeNumberOrGroup(Context context, String number)
throws InvalidNumberException
{
if (GroupUtil.isEncodedGroup(number)) return number;
else return canonicalizeNumber(context, number);
}
public static byte[] readFully(InputStream in) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] buffer = new byte[4069];