X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/591c0fe8a3744608575a6dcb1f6f4f9f818948d2..9e6a3534275d5bac8454792e05280f13fa5ef13c:/src/main/java/org/asamk/signal/util/Util.java diff --git a/src/main/java/org/asamk/signal/util/Util.java b/src/main/java/org/asamk/signal/util/Util.java index bc2d3377..79a6587b 100644 --- a/src/main/java/org/asamk/signal/util/Util.java +++ b/src/main/java/org/asamk/signal/util/Util.java @@ -2,13 +2,13 @@ package org.asamk.signal.util; import com.fasterxml.jackson.databind.JsonNode; +import org.asamk.signal.manager.groups.GroupId; +import org.asamk.signal.manager.groups.GroupIdFormatException; import org.whispersystems.signalservice.api.push.SignalServiceAddress; import org.whispersystems.signalservice.api.util.InvalidNumberException; import org.whispersystems.signalservice.api.util.PhoneNumberFormatter; import org.whispersystems.signalservice.api.util.UuidUtil; -import org.whispersystems.util.Base64; -import java.io.IOException; import java.io.InvalidObjectException; public class Util { @@ -48,12 +48,8 @@ public class Util { return node; } - public static byte[] decodeGroupId(String groupId) throws GroupIdFormatException { - try { - return Base64.decode(groupId); - } catch (IOException e) { - throw new GroupIdFormatException(groupId, e); - } + public static GroupId decodeGroupId(String groupId) throws GroupIdFormatException { + return GroupId.fromBase64(groupId); } public static String canonicalizeNumber(String number, String localNumber) throws InvalidNumberException {