mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
parent
e4c5144fbf
commit
c1775913b9
8 changed files with 31 additions and 18 deletions
|
@ -1,17 +1,10 @@
|
|||
package org.asamk.signal.manager.api;
|
||||
|
||||
import org.signal.libsignal.protocol.IdentityKey;
|
||||
|
||||
public record Identity(
|
||||
RecipientAddress recipient,
|
||||
IdentityKey identityKey,
|
||||
byte[] fingerprint,
|
||||
String safetyNumber,
|
||||
byte[] scannableSafetyNumber,
|
||||
TrustLevel trustLevel,
|
||||
long dateAddedTimestamp
|
||||
) {
|
||||
|
||||
public byte[] getFingerprint() {
|
||||
return identityKey.getPublicKey().serialize();
|
||||
}
|
||||
}
|
||||
) {}
|
||||
|
|
|
@ -1366,7 +1366,7 @@ public class ManagerImpl implements Manager {
|
|||
final var scannableFingerprint = context.getIdentityHelper()
|
||||
.computeSafetyNumberForScanning(identityInfo.getServiceId(), identityInfo.getIdentityKey());
|
||||
return new Identity(address.toApiRecipientAddress(),
|
||||
identityInfo.getIdentityKey(),
|
||||
identityInfo.getIdentityKey().getPublicKey().serialize(),
|
||||
context.getIdentityHelper()
|
||||
.computeSafetyNumber(identityInfo.getServiceId(), identityInfo.getIdentityKey()),
|
||||
scannableFingerprint == null ? null : scannableFingerprint.getSerialized(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue