X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/2e4d346bc826da5c35a17841772cf81ba4f98101..f1fd5284838c1f01c8c56fd3aa4291ae6341a626:/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java diff --git a/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java b/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java index aead1a28..844c3323 100644 --- a/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java +++ b/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java @@ -394,7 +394,7 @@ class ManagerImpl implements Manager { @Override public Pair createGroup( - String name, Set members, File avatarFile + String name, Set members, String avatarFile ) throws IOException, AttachmentInvalidException, UnregisteredRecipientException { return context.getGroupHelper() .createGroup(name, @@ -569,7 +569,7 @@ class ManagerImpl implements Manager { final var textAttachment = AttachmentUtils.createAttachmentStream(new StreamDetails(new ByteArrayInputStream( messageBytes), MimeUtils.LONG_TEXT, messageBytes.length), Optional.empty()); messageBuilder.withBody(message.messageText().substring(0, 2000)); - messageBuilder.withAttachment(textAttachment); + messageBuilder.withAttachment(context.getAttachmentHelper().uploadAttachment(textAttachment)); } else { messageBuilder.withBody(message.messageText()); } @@ -588,7 +588,8 @@ class ManagerImpl implements Manager { quote.message(), List.of(), resolveMentions(quote.mentions()), - SignalServiceDataMessage.Quote.Type.NORMAL)); + SignalServiceDataMessage.Quote.Type.NORMAL, + List.of())); } if (message.sticker().isPresent()) { final var sticker = message.sticker().get(); @@ -699,7 +700,7 @@ class ManagerImpl implements Manager { byte[] receipt, String note, RecipientIdentifier.Single recipient ) throws IOException { final var paymentNotification = new SignalServiceDataMessage.PaymentNotification(receipt, note); - final var payment = new SignalServiceDataMessage.Payment(paymentNotification); + final var payment = new SignalServiceDataMessage.Payment(paymentNotification, null); final var messageBuilder = SignalServiceDataMessage.newBuilder().withPayment(payment); try { return sendMessage(messageBuilder, Set.of(recipient));