mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-05-23 14:04:16 +00:00
Compare commits
3 Commits
9b09df5f17
...
251bd2d87a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
251bd2d87a | ||
|
|
a3fcda7598 | ||
|
|
c9e2504349 |
@ -7,11 +7,11 @@ plugins {
|
||||
}
|
||||
|
||||
tasks.named<KotlinCompilationTask<KotlinJvmCompilerOptions>>("compileKotlin").configure {
|
||||
compilerOptions.jvmTarget.set(JvmTarget.JVM_24)
|
||||
compilerOptions.jvmTarget.set(JvmTarget.JVM_25)
|
||||
}
|
||||
|
||||
java {
|
||||
targetCompatibility = JavaVersion.VERSION_24
|
||||
targetCompatibility = JavaVersion.VERSION_25
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@ -558,16 +558,24 @@ public class GroupHelper {
|
||||
private void storeProfileKeysFromMembers(final DecryptedGroup group) {
|
||||
for (var member : group.members) {
|
||||
final var serviceId = ServiceId.parseOrThrow(member.aciBytes);
|
||||
final var recipientId = account.getRecipientResolver().resolveRecipient(serviceId);
|
||||
final var profileStore = account.getProfileStore();
|
||||
if (profileStore.getProfileKey(recipientId) != null) {
|
||||
// We already have a profile key, not updating it from a non-authoritative source
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
profileStore.storeProfileKey(recipientId, new ProfileKey(member.profileKey.toByteArray()));
|
||||
} catch (InvalidInputException ignored) {
|
||||
}
|
||||
storeProfileKeyIfMissing(serviceId, member.profileKey.toByteArray());
|
||||
}
|
||||
for (var member : group.requestingMembers) {
|
||||
final var serviceId = ServiceId.parseOrThrow(member.aciBytes);
|
||||
storeProfileKeyIfMissing(serviceId, member.profileKey.toByteArray());
|
||||
}
|
||||
}
|
||||
|
||||
private void storeProfileKeyIfMissing(final ServiceId serviceId, final byte[] profileKeyBytes) {
|
||||
final var recipientId = account.getRecipientResolver().resolveRecipient(serviceId);
|
||||
final var profileStore = account.getProfileStore();
|
||||
if (profileStore.getProfileKey(recipientId) != null) {
|
||||
// We already have a profile key, not updating it from a non-authoritative source
|
||||
return;
|
||||
}
|
||||
try {
|
||||
profileStore.storeProfileKey(recipientId, new ProfileKey(profileKeyBytes));
|
||||
} catch (InvalidInputException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user