mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Move identity store to database
This commit is contained in:
parent
dc8b83a110
commit
0c4a037dde
11 changed files with 312 additions and 165 deletions
|
@ -10,6 +10,7 @@ import org.asamk.signal.output.JsonWriter;
|
|||
import org.asamk.signal.output.OutputWriter;
|
||||
import org.asamk.signal.output.PlainTextWriter;
|
||||
import org.asamk.signal.util.CommandUtil;
|
||||
import org.asamk.signal.util.DateUtils;
|
||||
import org.asamk.signal.util.Hex;
|
||||
import org.asamk.signal.util.Util;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -32,7 +33,7 @@ public class ListIdentitiesCommand implements JsonRpcLocalCommand {
|
|||
writer.println("{}: {} Added: {} Fingerprint: {} Safety Number: {}",
|
||||
theirId.recipient().getLegacyIdentifier(),
|
||||
theirId.trustLevel(),
|
||||
theirId.dateAdded(),
|
||||
DateUtils.formatTimestamp(theirId.dateAddedTimestamp()),
|
||||
Hex.toString(theirId.getFingerprint()),
|
||||
Util.formatSafetyNumber(theirId.safetyNumber()));
|
||||
}
|
||||
|
@ -74,7 +75,7 @@ public class ListIdentitiesCommand implements JsonRpcLocalCommand {
|
|||
? null
|
||||
: Base64.getEncoder().encodeToString(scannableSafetyNumber),
|
||||
id.trustLevel().name(),
|
||||
id.dateAdded().getTime());
|
||||
id.dateAddedTimestamp());
|
||||
}).toList();
|
||||
|
||||
writer.write(jsonIdentities);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue