mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20: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
|
@ -2425,6 +2425,13 @@
|
|||
"queryAllDeclaredConstructors":true,
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"org.whispersystems.signalservice.internal.push.GetUsernameFromLinkResponseBody",
|
||||
"allDeclaredFields":true,
|
||||
"queryAllDeclaredMethods":true,
|
||||
"queryAllDeclaredConstructors":true,
|
||||
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }, {"name":"<init>","parameterTypes":["java.lang.String","int","kotlin.jvm.internal.DefaultConstructorMarker"] }]
|
||||
},
|
||||
{
|
||||
"name":"org.whispersystems.signalservice.internal.push.GroupMismatchedDevices",
|
||||
"allDeclaredFields":true,
|
||||
|
|
|
@ -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