mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-25 09:08:37 +00:00
Exclude the user's own number from notifyNewUsers
Closes #5229 // FREEBIE
This commit is contained in:
committed by
Moxie Marlinspike
parent
156c5c6e09
commit
72064d8827
@@ -184,6 +184,16 @@ public class Util {
|
||||
else return canonicalizeNumber(context, number);
|
||||
}
|
||||
|
||||
public static boolean isOwnNumber(Context context, String number) {
|
||||
try {
|
||||
String e164number = canonicalizeNumber(context, number);
|
||||
return TextSecurePreferences.getLocalNumber(context).equals(e164number);
|
||||
} catch (InvalidNumberException e) {
|
||||
Log.w(TAG, e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static byte[] readFully(InputStream in) throws IOException {
|
||||
ByteArrayOutputStream bout = new ByteArrayOutputStream();
|
||||
byte[] buffer = new byte[4096];
|
||||
|
||||
Reference in New Issue
Block a user