mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 11:00:38 +00:00
Replace Base64 class from libsignal with java.util.Base64
This commit is contained in:
parent
e6ea5d55f8
commit
9a775171b5
17 changed files with 100 additions and 96 deletions
|
@ -20,9 +20,9 @@ import org.freedesktop.dbus.connections.impl.DBusConnection;
|
|||
import org.freedesktop.dbus.exceptions.DBusException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.whispersystems.util.Base64;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Base64;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.asamk.signal.util.ErrorUtils.handleAssertionError;
|
||||
|
@ -81,7 +81,7 @@ public class ReceiveCommand implements ExtendedDbusCommand, LocalCommand {
|
|||
messageReceived.getMessage()));
|
||||
if (messageReceived.getGroupId().length > 0) {
|
||||
System.out.println("Group info:");
|
||||
System.out.println(" Id: " + Base64.encodeBytes(messageReceived.getGroupId()));
|
||||
System.out.println(" Id: " + Base64.getEncoder().encodeToString(messageReceived.getGroupId()));
|
||||
}
|
||||
if (messageReceived.getAttachments().size() > 0) {
|
||||
System.out.println("Attachments: ");
|
||||
|
@ -130,7 +130,7 @@ public class ReceiveCommand implements ExtendedDbusCommand, LocalCommand {
|
|||
syncReceived.getMessage()));
|
||||
if (syncReceived.getGroupId().length > 0) {
|
||||
System.out.println("Group info:");
|
||||
System.out.println(" Id: " + Base64.encodeBytes(syncReceived.getGroupId()));
|
||||
System.out.println(" Id: " + Base64.getEncoder().encodeToString(syncReceived.getGroupId()));
|
||||
}
|
||||
if (syncReceived.getAttachments().size() > 0) {
|
||||
System.out.println("Attachments: ");
|
||||
|
|
|
@ -7,9 +7,9 @@ import org.asamk.Signal;
|
|||
import org.asamk.signal.manager.groups.GroupIdFormatException;
|
||||
import org.asamk.signal.util.Util;
|
||||
import org.freedesktop.dbus.exceptions.DBusExecutionException;
|
||||
import org.whispersystems.util.Base64;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Base64;
|
||||
import java.util.List;
|
||||
|
||||
import static org.asamk.signal.util.ErrorUtils.handleAssertionError;
|
||||
|
@ -58,7 +58,7 @@ public class UpdateGroupCommand implements DbusCommand {
|
|||
try {
|
||||
byte[] newGroupId = signal.updateGroup(groupId, groupName, groupMembers, groupAvatar);
|
||||
if (groupId.length != newGroupId.length) {
|
||||
System.out.println("Creating new group \"" + Base64.encodeBytes(newGroupId) + "\" …");
|
||||
System.out.println("Creating new group \"" + Base64.getEncoder().encodeToString(newGroupId) + "\" …");
|
||||
}
|
||||
return 0;
|
||||
} catch (AssertionError e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue