Update libsignal-service-java

This commit is contained in:
AsamK 2021-05-19 22:51:35 +02:00
parent f445cfb5c1
commit 30690785fd
19 changed files with 71 additions and 42 deletions

View file

@ -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());
}
}