mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Remove E164s most places and prefer ServiceId more places.\
This commit is contained in:
committed by
Alex Hart
parent
d6b6884c69
commit
935dd7de45
@@ -1,6 +1,5 @@
|
||||
package org.thoughtcrime.securesms.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -14,7 +13,6 @@ import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
import org.whispersystems.signalservice.api.profiles.SignalServiceProfile;
|
||||
import org.whispersystems.signalservice.api.push.ACI;
|
||||
import org.whispersystems.signalservice.api.push.ServiceId;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -70,7 +68,7 @@ public class UsernameUtil {
|
||||
try {
|
||||
Log.d(TAG, "No local user with this username. Searching remotely.");
|
||||
SignalServiceProfile profile = ApplicationDependencies.getSignalServiceMessageReceiver().retrieveProfileByUsername(username, Optional.absent(), Locale.getDefault());
|
||||
return Optional.fromNullable(profile.getAci());
|
||||
return Optional.fromNullable(profile.getServiceId());
|
||||
} catch (IOException e) {
|
||||
return Optional.absent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user