mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Fix sending to username
This commit is contained in:
parent
d84362eb0f
commit
ed40d116b7
3 changed files with 10 additions and 3 deletions
|
@ -19,7 +19,7 @@ public record RecipientAddress(Optional<UUID> uuid, Optional<String> number, Opt
|
|||
public RecipientAddress {
|
||||
uuid = uuid.isPresent() && uuid.get().equals(UNKNOWN_UUID) ? Optional.empty() : uuid;
|
||||
if (uuid.isEmpty() && number.isEmpty() && username.isEmpty()) {
|
||||
throw new AssertionError("Must have either a UUID or E164 number!");
|
||||
throw new AssertionError("Must have either a UUID, username or E164 number!");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ public record RecipientAddress(
|
|||
if (pni.isPresent() && pni.get().isUnknown()) {
|
||||
pni = Optional.empty();
|
||||
}
|
||||
if (aci.isEmpty() && pni.isEmpty() && number.isEmpty()) {
|
||||
throw new AssertionError("Must have either a ServiceId or E164 number!");
|
||||
if (aci.isEmpty() && pni.isEmpty() && number.isEmpty() && username.isEmpty()) {
|
||||
throw new AssertionError("Must have either a ServiceId, username or E164 number!");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue