Update libsignal-service
This commit is contained in:
		
							parent
							
								
									baf7b74a61
								
							
						
					
					
						commit
						5ff66728e3
					
				| @ -2142,7 +2142,7 @@ | ||||
|   "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", | ||||
|  | ||||
| @ -30,7 +30,16 @@ public class ServiceConfig { | ||||
|         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( | ||||
|  | ||||
| @ -105,7 +105,7 @@ public class PinHelper { | ||||
|     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 -> { | ||||
|  | ||||
| @ -92,6 +92,7 @@ import org.signal.libsignal.usernames.BaseUsernameException; | ||||
| 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; | ||||
| @ -738,17 +739,23 @@ public class ManagerImpl implements Manager { | ||||
|     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())); | ||||
|  | ||||
| @ -197,8 +197,7 @@ public class SignalDependencies { | ||||
|                         Optional.empty(), | ||||
|                         executor, | ||||
|                         ServiceConfig.MAX_ENVELOPE_SIZE, | ||||
|                         pushServiceSocket, | ||||
|                         false)); | ||||
|                         pushServiceSocket)); | ||||
|     } | ||||
| 
 | ||||
|     public List<SecureValueRecovery> getSecureValueRecoveryV2() { | ||||
|  | ||||
| @ -9,6 +9,7 @@ import java.io.IOException; | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
| import java.util.Optional; | ||||
| import java.util.UUID; | ||||
| 
 | ||||
| public class AttachmentUtils { | ||||
| 
 | ||||
| @ -58,6 +59,7 @@ public class AttachmentUtils { | ||||
|                 blurHash, | ||||
|                 null, | ||||
|                 null, | ||||
|                 resumableUploadSpec); | ||||
|                 resumableUploadSpec, | ||||
|                 UUID.randomUUID()); | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -15,7 +15,7 @@ dependencyResolutionManagement { | ||||
|             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") | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 AsamK
						AsamK