"allDeclaredFields":true,
"allDeclaredMethods":true,
"allDeclaredConstructors":true,
- "methods":[{"name":"getAnnouncementGroup","parameterTypes":[] }, {"name":"getChangeNumber","parameterTypes":[] }, {"name":"getGiftBadges","parameterTypes":[] }, {"name":"getPaymentActivation","parameterTypes":[] }, {"name":"getPni","parameterTypes":[] }, {"name":"getSenderKey","parameterTypes":[] }, {"name":"getStorage","parameterTypes":[] }, {"name":"getStories","parameterTypes":[] }]
+ "methods":[{"name":"getAnnouncementGroup","parameterTypes":[] }, {"name":"getChangeNumber","parameterTypes":[] }, {"name":"getDeleteSync","parameterTypes":[] }, {"name":"getGiftBadges","parameterTypes":[] }, {"name":"getPaymentActivation","parameterTypes":[] }, {"name":"getPni","parameterTypes":[] }, {"name":"getSenderKey","parameterTypes":[] }, {"name":"getStorage","parameterTypes":[] }, {"name":"getStories","parameterTypes":[] }]
},
{
"name":"org.whispersystems.signalservice.api.account.ChangePhoneNumberRequest",
final var giftBadges = !isPrimaryDevice;
final var pni = !isPrimaryDevice;
final var paymentActivation = !isPrimaryDevice;
- return new AccountAttributes.Capabilities(true, true, true, true, true, giftBadges, pni, paymentActivation);
+ final var deleteSync = !isPrimaryDevice;
+ return new AccountAttributes.Capabilities(true,
+ true,
+ true,
+ true,
+ true,
+ giftBadges,
+ pni,
+ paymentActivation,
+ deleteSync);
}
public static ServiceEnvironmentConfig getServiceEnvironmentConfig(
public SecureValueRecovery.RestoreResponse.Success getRegistrationLockData(
SecureValueRecovery secureValueRecovery, AuthCredentials authCredentials, String pin
) throws IOException, IncorrectPinException {
- final var restoreResponse = secureValueRecovery.restoreDataPreRegistration(authCredentials, pin);
+ final var restoreResponse = secureValueRecovery.restoreDataPreRegistration(authCredentials, null, pin);
switch (restoreResponse) {
case SecureValueRecovery.RestoreResponse.Success s -> {
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.whispersystems.signalservice.api.SignalSessionLock;
+import org.whispersystems.signalservice.api.messages.SignalServiceAttachment;
import org.whispersystems.signalservice.api.messages.SignalServiceDataMessage;
import org.whispersystems.signalservice.api.messages.SignalServicePreview;
import org.whispersystems.signalservice.api.messages.SignalServiceReceiptMessage;
private void applyMessage(
final SignalServiceDataMessage.Builder messageBuilder, final Message message
) throws AttachmentInvalidException, IOException, UnregisteredRecipientException, InvalidStickerException {
+ final var additionalAttachments = new ArrayList<SignalServiceAttachment>();
if (message.messageText().length() > 2000) {
final var messageBytes = message.messageText().getBytes(StandardCharsets.UTF_8);
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(context.getAttachmentHelper().uploadAttachment(textAttachment));
+ additionalAttachments.add(context.getAttachmentHelper().uploadAttachment(textAttachment));
} else {
messageBuilder.withBody(message.messageText());
}
if (!message.attachments().isEmpty()) {
- messageBuilder.withAttachments(context.getAttachmentHelper().uploadAttachments(message.attachments()));
+ if (!additionalAttachments.isEmpty()) {
+ additionalAttachments.addAll(context.getAttachmentHelper().uploadAttachments(message.attachments()));
+ messageBuilder.withAttachments(additionalAttachments);
+ } else {
+ messageBuilder.withAttachments(context.getAttachmentHelper().uploadAttachments(message.attachments()));
+ }
}
if (!message.mentions().isEmpty()) {
messageBuilder.withMentions(resolveMentions(message.mentions()));
Optional.empty(),
executor,
ServiceConfig.MAX_ENVELOPE_SIZE,
- pushServiceSocket,
- false));
+ pushServiceSocket));
}
public List<SecureValueRecovery> getSecureValueRecoveryV2() {
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
+import java.util.UUID;
public class AttachmentUtils {
blurHash,
null,
null,
- resumableUploadSpec);
+ resumableUploadSpec,
+ UUID.randomUUID());
}
}
library("slf4j.jul", "org.slf4j", "jul-to-slf4j").versionRef("slf4j")
library("logback", "ch.qos.logback", "logback-classic").version("1.5.6")
- library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_103")
+ library("signalservice", "com.github.turasa", "signal-service-java").version("2.15.3_unofficial_104")
library("sqlite", "org.xerial", "sqlite-jdbc").version("3.46.0.0")
library("hikari", "com.zaxxer", "HikariCP").version("5.1.0")
library("junit.jupiter", "org.junit.jupiter", "junit-jupiter").version("5.10.2")