mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Refactor to use GroupId class to wrap the byte array
Helps distinguish between group v1 and v2 ids
This commit is contained in:
parent
67f62947c6
commit
9942d967a4
31 changed files with 358 additions and 228 deletions
|
@ -5,7 +5,7 @@ import net.sourceforge.argparse4j.inf.Namespace;
|
|||
import net.sourceforge.argparse4j.inf.Subparser;
|
||||
|
||||
import org.asamk.Signal;
|
||||
import org.asamk.signal.util.GroupIdFormatException;
|
||||
import org.asamk.signal.manager.GroupIdFormatException;
|
||||
import org.asamk.signal.util.IOUtils;
|
||||
import org.asamk.signal.util.Util;
|
||||
import org.freedesktop.dbus.exceptions.DBusExecutionException;
|
||||
|
@ -79,7 +79,7 @@ public class SendCommand implements DbusCommand {
|
|||
if (ns.getString("group") != null) {
|
||||
byte[] groupId;
|
||||
try {
|
||||
groupId = Util.decodeGroupId(ns.getString("group"));
|
||||
groupId = Util.decodeGroupId(ns.getString("group")).serialize();
|
||||
} catch (GroupIdFormatException e) {
|
||||
handleGroupIdFormatException(e);
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue