From e36a2f862c996825944927c6e24bf8521edd6edb Mon Sep 17 00:00:00 2001 From: AsamK Date: Thu, 7 Sep 2017 22:18:08 +0200 Subject: [PATCH] Update libsignal-service-java --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.jar | Bin 54712 -> 54708 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- src/main/java/org/asamk/signal/Manager.java | 33 +++++++++++++------- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index 5c1470ee..9b9e208a 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ repositories { } dependencies { - compile 'com.github.turasa:signal-service-java:2.5.17_unofficial_1' + compile 'com.github.turasa:signal-service-java:2.6.5_unofficial_1' compile 'org.bouncycastle:bcprov-jdk15on:1.55' compile 'net.sourceforge.argparse4j:argparse4j:0.7.0' compile 'org.freedesktop.dbus:dbus-java:2.7.0' diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 88a5f3eb505fa1aa2905305128984dc872f1c1f6..7a3265ee94c0ab25cf079ac8ccdf87f41d455d42 100644 GIT binary patch delta 673 zcmYL{T}YEr9LC@CS2iPM?-E7dDatC-SEkOe=9HWi7A|cvi!7}mR_kk$kr%=)BqA>g zwTIC+k+YNsInN&s|1%lPmm+E8Eh%)}BF_bAu%@Q_3^@dEz<l3g#bM?1)#;Dy%C z*08Rfp_Kwr&n_$#^@k<$_J3tb8p5lYQ&ern_>2i&vk|sgm5ME*;j$Po#HGGU$o4ut zVzaems!Pipl+CHkkB+&cBs+!K)|La8vj8h|Dk*JgD;Jh|m0CK5^vxfpvMzy<`9q9g zTsTe!4=kSDxVNA(A0`(X>6r&_J$qqD%BYVhRPN=n5NEx+gf+&k=v55*itr`UOy_+Z zD@AfLs!*sG-+Ig8NXU4}<)fRpKDZOVqE@=yFHq}OaQd@KrU4Wmd>#aSeGwT?5UXcak+u^JQr9RKSG`{j%M7A*Dx9H<8Jl?#zYtUjVpqWOon)o1DZFX^1&JE}ZvX%Q delta 808 zcmYk4Ur3Wt7{ArK}A1sdDbHrMF`|aanBvx>N?QNSF>+*V zC=D*noS1KZE-ewcr#;3D%6w+SW&V8ZRM#jzg)m`<(Z=Lu`3nccM15$ zr9;~Xg?75REkLc?B#vOM(eKzguq2uNk$Q49h=SJ08M1nXoQs^I^vgmPMxA76hP}B6 z52FgZjX>1FMz9{e!W7iaU#IvDyy`IH(|k2G-xBg~!h(jFOyM?Rdt-;`0qiKN=DJ>phnahc9{i;%y&2sfAXcpaD7PrQ$}lCf8S zx`oq}+mF(ICt{p`U67d;Y_W+h2ZZzt=tSG}!PH^>c_CosU=H6vp`{_w zHhb8>`zd4_5!SryqLxu~k6O{U%qKd5tOTFvgi190{VsK)-;tT{(vK-absent(), verificationCode); } private List generatePreKeys() { @@ -856,7 +863,7 @@ class Manager implements Signal { private void sendSyncMessage(SignalServiceSyncMessage message) throws IOException, UntrustedIdentityException { - SignalServiceMessageSender messageSender = new SignalServiceMessageSender(serviceUrls, username, password, + SignalServiceMessageSender messageSender = new SignalServiceMessageSender(serviceConfiguration, username, password, deviceId, signalProtocolStore, USER_AGENT, Optional.fromNullable(messagePipe), Optional.absent()); try { messageSender.sendMessage(message); @@ -873,7 +880,7 @@ class Manager implements Signal { SignalServiceDataMessage message = null; try { - SignalServiceMessageSender messageSender = new SignalServiceMessageSender(serviceUrls, username, password, + SignalServiceMessageSender messageSender = new SignalServiceMessageSender(serviceConfiguration, username, password, deviceId, signalProtocolStore, USER_AGENT, Optional.fromNullable(messagePipe), Optional.absent()); message = messageBuilder.build(); @@ -1104,7 +1111,7 @@ class Manager implements Signal { public void receiveMessages(long timeout, TimeUnit unit, boolean returnOnTimeout, boolean ignoreAttachments, ReceiveMessageHandler handler) throws IOException { retryFailedReceivedMessages(handler, ignoreAttachments); - final SignalServiceMessageReceiver messageReceiver = new SignalServiceMessageReceiver(serviceUrls, username, password, deviceId, signalingKey, USER_AGENT); + final SignalServiceMessageReceiver messageReceiver = new SignalServiceMessageReceiver(serviceConfiguration, username, password, deviceId, signalingKey, USER_AGENT); try { if (messagePipe == null) { @@ -1406,7 +1413,7 @@ class Manager implements Signal { } } - final SignalServiceMessageReceiver messageReceiver = new SignalServiceMessageReceiver(serviceUrls, username, password, deviceId, signalingKey, USER_AGENT); + final SignalServiceMessageReceiver messageReceiver = new SignalServiceMessageReceiver(serviceConfiguration, username, password, deviceId, signalingKey, USER_AGENT); File tmpFile = Util.createTempFile(); try (InputStream input = messageReceiver.retrieveAttachment(pointer, tmpFile, MAX_ATTACHMENT_SIZE)) { @@ -1432,7 +1439,7 @@ class Manager implements Signal { } private InputStream retrieveAttachmentAsStream(SignalServiceAttachmentPointer pointer, File tmpFile) throws IOException, InvalidMessageException { - final SignalServiceMessageReceiver messageReceiver = new SignalServiceMessageReceiver(serviceUrls, username, password, deviceId, signalingKey, USER_AGENT); + final SignalServiceMessageReceiver messageReceiver = new SignalServiceMessageReceiver(serviceConfiguration, username, password, deviceId, signalingKey, USER_AGENT); return messageReceiver.retrieveAttachment(pointer, tmpFile, MAX_ATTACHMENT_SIZE); } @@ -1504,8 +1511,10 @@ class Manager implements Signal { } } + // TODO include profile key out.write(new DeviceContact(record.number, Optional.fromNullable(record.name), - createContactAvatarAttachment(record.number), Optional.fromNullable(record.color), Optional.fromNullable(verifiedMessage))); + createContactAvatarAttachment(record.number), Optional.fromNullable(record.color), + Optional.fromNullable(verifiedMessage), Optional.absent())); } }