mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Update libsignal-service-java
This commit is contained in:
parent
f445cfb5c1
commit
30690785fd
19 changed files with 71 additions and 42 deletions
|
@ -3,6 +3,7 @@ package org.asamk.signal.util;
|
|||
import org.asamk.signal.manager.groups.GroupId;
|
||||
import org.asamk.signal.manager.groups.GroupIdFormatException;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
||||
|
||||
public class Util {
|
||||
|
||||
|
@ -30,4 +31,8 @@ public class Util {
|
|||
public static GroupId decodeGroupId(String groupId) throws GroupIdFormatException {
|
||||
return GroupId.fromBase64(groupId);
|
||||
}
|
||||
|
||||
public static String getLegacyIdentifier(final SignalServiceAddress address) {
|
||||
return address.getNumber().or(() -> address.getUuid().get().toString());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue