Skip to content

Commit

Permalink
Update libsignal-service
Browse files Browse the repository at this point in the history
Fixes #1633
  • Loading branch information
AsamK committed Nov 24, 2024
1 parent fe752e0 commit 68c9d84
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 6 deletions.
4 changes: 4 additions & 0 deletions graalvm-config-dir/jni-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@
"name":"org.signal.libsignal.usernames.CannotBeEmptyException",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
},
{
"name":"org.signal.libsignal.usernames.DiscriminatorCannotBeZeroException",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
},
{
"name":"org.signal.libsignal.usernames.MissingSeparatorException",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
Expand Down
10 changes: 10 additions & 0 deletions graalvm-config-dir/reflect-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,12 @@
"allDeclaredFields":true,
"queryAllDeclaredMethods":true
},
{
"name":"java.util.ImmutableCollections$List12",
"allDeclaredFields":true,
"queryAllDeclaredMethods":true,
"queryAllDeclaredConstructors":true
},
{
"name":"java.util.ImmutableCollections$ListN",
"allDeclaredFields":true,
Expand Down Expand Up @@ -2929,6 +2935,7 @@
{
"name":"org.whispersystems.signalservice.internal.storage.protos.AccountRecord",
"allDeclaredFields":true,
"fields":[{"name":"avatarUrlPath"}, {"name":"backupsSubscriberCurrencyCode"}, {"name":"backupsSubscriberId"}, {"name":"displayBadgesOnProfile"}, {"name":"e164"}, {"name":"familyName"}, {"name":"givenName"}, {"name":"hasCompletedUsernameOnboarding"}, {"name":"hasSeenGroupStoryEducationSheet"}, {"name":"hasSetMyStoriesPrivacy"}, {"name":"hasViewedOnboardingStory"}, {"name":"keepMutedChatsArchived"}, {"name":"linkPreviews"}, {"name":"noteToSelfArchived"}, {"name":"noteToSelfMarkedUnread"}, {"name":"payments"}, {"name":"phoneNumberSharingMode"}, {"name":"pinnedConversations"}, {"name":"preferContactAvatars"}, {"name":"preferredReactionEmoji"}, {"name":"primarySendsSms"}, {"name":"profileKey"}, {"name":"readReceipts"}, {"name":"sealedSenderIndicators"}, {"name":"storiesDisabled"}, {"name":"storyViewReceiptsEnabled"}, {"name":"subscriberCurrencyCode"}, {"name":"subscriberId"}, {"name":"subscriptionManuallyCancelled"}, {"name":"typingIndicators"}, {"name":"universalExpireTimer"}, {"name":"unlistedPhoneNumber"}, {"name":"username"}, {"name":"usernameLink"}],
"methods":[{"name":"adapter","parameterTypes":[] }, {"name":"unknownFields","parameterTypes":[] }]
},
{
Expand All @@ -2955,6 +2962,7 @@
{
"name":"org.whispersystems.signalservice.internal.storage.protos.ContactRecord",
"allDeclaredFields":true,
"fields":[{"name":"aci"}, {"name":"archived"}, {"name":"blocked"}, {"name":"e164"}, {"name":"familyName"}, {"name":"givenName"}, {"name":"hidden"}, {"name":"hideStory"}, {"name":"identityKey"}, {"name":"identityState"}, {"name":"markedUnread"}, {"name":"mutedUntilTimestamp"}, {"name":"nickname"}, {"name":"note"}, {"name":"pni"}, {"name":"pniSignatureVerified"}, {"name":"profileKey"}, {"name":"systemFamilyName"}, {"name":"systemGivenName"}, {"name":"systemNickname"}, {"name":"unregisteredAtTimestamp"}, {"name":"username"}, {"name":"whitelisted"}],
"methods":[{"name":"adapter","parameterTypes":[] }, {"name":"unknownFields","parameterTypes":[] }]
},
{
Expand All @@ -2973,6 +2981,7 @@
{
"name":"org.whispersystems.signalservice.internal.storage.protos.GroupV1Record",
"allDeclaredFields":true,
"fields":[{"name":"archived"}, {"name":"blocked"}, {"name":"id"}, {"name":"markedUnread"}, {"name":"mutedUntilTimestamp"}, {"name":"whitelisted"}],
"methods":[{"name":"adapter","parameterTypes":[] }, {"name":"unknownFields","parameterTypes":[] }]
},
{
Expand All @@ -2984,6 +2993,7 @@
{
"name":"org.whispersystems.signalservice.internal.storage.protos.GroupV2Record",
"allDeclaredFields":true,
"fields":[{"name":"archived"}, {"name":"blocked"}, {"name":"dontNotifyForMentionsIfMuted"}, {"name":"hideStory"}, {"name":"markedUnread"}, {"name":"masterKey"}, {"name":"mutedUntilTimestamp"}, {"name":"storySendMode"}, {"name":"whitelisted"}],
"methods":[{"name":"adapter","parameterTypes":[] }, {"name":"unknownFields","parameterTypes":[] }]
},
{
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
slf4j-jul = { module = "org.slf4j:jul-to-slf4j", version.ref = "slf4j" }
logback = "ch.qos.logback:logback-classic:1.5.12"

signalservice = "com.github.turasa:signal-service-java:2.15.3_unofficial_111"
signalservice = "com.github.turasa:signal-service-java:2.15.3_unofficial_112"
sqlite = "org.xerial:sqlite-jdbc:3.47.0.0"
hikari = "com.zaxxer:HikariCP:6.2.1"
junit-jupiter = "org.junit.jupiter:junit-jupiter:5.11.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ public void addDevice(DeviceLinkUrl deviceLinkInfo) throws IOException, org.asam
account.getProfileKey(),
account.getOrCreatePinMasterKey(),
account.getOrCreateMediaRootBackupKey(),
account.getOrCreateAccountEntropyPool(),
verificationCode.getVerificationCode(),
null));
account.setMultiDevice(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ public String finishDeviceLink(String deviceName) throws IOException, TimeoutExc
ret.getAciIdentity(),
ret.getPniIdentity(),
profileKey,
ret.getMasterKey());
ret.getMasterKey(),
ret.getAccountEntropyPool(),
ret.getMediaRootBackupKey());

account.getConfigurationStore().setReadReceipts(ret.isReadReceipts());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ public void setProvisioningData(
final IdentityKeyPair aciIdentity,
final IdentityKeyPair pniIdentity,
final ProfileKey profileKey,
final MasterKey masterKey
final MasterKey masterKey,
final AccountEntropyPool accountEntropyPool,
final MediaRootBackupKey mediaRootBackupKey
) {
this.deviceId = 0;
this.number = number;
Expand All @@ -308,8 +310,14 @@ public void setProvisioningData(
this.registered = false;
this.isMultiDevice = true;
setLastReceiveTimestamp(0L);
this.pinMasterKey = masterKey;
this.accountEntropyPool = null;
if (accountEntropyPool != null) {
this.pinMasterKey = null;
this.accountEntropyPool = accountEntropyPool;
} else {
this.pinMasterKey = masterKey;
this.accountEntropyPool = null;
}
this.mediaRootBackupKey = mediaRootBackupKey;
getKeyValueStore().storeEntry(storageManifestVersion, -1L);
this.setStorageManifest(null);
this.storageKey = null;
Expand Down
1 change: 1 addition & 0 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ exec 3<> "$FIFO_FILE"
echo '{"jsonrpc":"2.0","id":7,"method":"sendTyping","params":{"recipient":"'"$NUMBER_1"'"}}' >&3
echo '{"jsonrpc":"2.0","id":7,"method":"send","params":{"recipient":"'"$NUMBER_1"'","message":"some text"}}' >&3
echo '{"jsonrpc":"2.0","id":7,"method":"send","params":{"recipients":["'"$NUMBER_1"'","'"$NUMBER_2"'"],"message":"some other text"}}' >&3
echo '{"jsonrpc":"2.0","id":7,"method":"sendReaction","params":{"recipients":["'"$NUMBER_2"'"],"targetAuthor":"'"$NUMBER_1"'","emoji":"👍","targetTimestamp":4756473756}}' >&3
echo '{"jsonrpc":"2.0","id":7,"method":"updateProfile","params":{"givenName":"n1","familyName":"n2","about":"ABA","aboutEmoji":"EMO","avatar":"LICENSE"}}' >&3
echo '{"jsonrpc":"2.0","id":7,"method":"getUserStatus","params":{"recipient":"'"$NUMBER_1"'"}}' >&3

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/asamk/signal/BaseConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class BaseConfig {
public static final String PROJECT_VERSION = BaseConfig.class.getPackage().getImplementationVersion();

static final String USER_AGENT_SIGNAL_ANDROID = Optional.ofNullable(System.getenv("SIGNAL_CLI_USER_AGENT"))
.orElse("Signal-Android/7.21.4");
.orElse("Signal-Android/7.26.1");
static final String USER_AGENT_SIGNAL_CLI = PROJECT_NAME == null
? "signal-cli"
: PROJECT_NAME + "/" + PROJECT_VERSION;
Expand Down

0 comments on commit 68c9d84

Please sign in to comment.