Minor fixes

This commit is contained in:
david-harley 2020-12-24 15:36:59 +10:30
parent 938b2a2b9d
commit fbf2f79459
2 changed files with 2 additions and 7 deletions

View file

@ -126,7 +126,7 @@ Use listDevices to see the deviceIds.
=== isRegistered === isRegistered
Checks if a list of users are registered on Signal or not. Checks if a list of phone numbers are registered on Signal or not.
[NUMBER [NUMBER ...]]:: [NUMBER [NUMBER ...]]::
One or more numbers to check. One or more numbers to check.

View file

@ -353,12 +353,7 @@ public class Manager implements Closeable {
* @throws IOException if its unable to check if the user is registered * @throws IOException if its unable to check if the user is registered
*/ */
public boolean isUserRegistered(String number) throws IOException { public boolean isUserRegistered(String number) throws IOException {
ContactTokenDetails details = this.accountManager.getContact(number).orNull(); return this.accountManager.getContact(number).orNull() != null;
if (details == null) {
return false;
}
return true;
} }
public void register(boolean voiceVerification, String captcha) throws IOException { public void register(boolean voiceVerification, String captcha) throws IOException {