mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Resolve recipient address when displaying untrusted identity message
This commit is contained in:
parent
3935ebf81b
commit
b9b4d846d3
1 changed files with 6 additions and 3 deletions
|
@ -67,14 +67,17 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
|
||||||
var e = (UntrustedIdentityException) exception;
|
var e = (UntrustedIdentityException) exception;
|
||||||
writer.println(
|
writer.println(
|
||||||
"The user’s key is untrusted, either the user has reinstalled Signal or a third party sent this message.");
|
"The user’s key is untrusted, either the user has reinstalled Signal or a third party sent this message.");
|
||||||
|
final var recipientName = m.resolveSignalServiceAddress(e.getName()).getLegacyIdentifier();
|
||||||
writer.println(
|
writer.println(
|
||||||
"Use 'signal-cli -u {0} listIdentities -n {1}', verify the key and run 'signal-cli -u {0} trust -v \"FINGER_PRINT\" {1}' to mark it as trusted",
|
"Use 'signal-cli -u {} listIdentities -n {}', verify the key and run 'signal-cli -u {} trust -v \"FINGER_PRINT\" {}' to mark it as trusted",
|
||||||
m.getUsername(),
|
m.getUsername(),
|
||||||
e.getName());
|
recipientName,
|
||||||
|
m.getUsername(),
|
||||||
|
recipientName);
|
||||||
writer.println(
|
writer.println(
|
||||||
"If you don't care about security, use 'signal-cli -u {} trust -a {}' to trust it without verification",
|
"If you don't care about security, use 'signal-cli -u {} trust -a {}' to trust it without verification",
|
||||||
m.getUsername(),
|
m.getUsername(),
|
||||||
e.getName());
|
recipientName);
|
||||||
} else {
|
} else {
|
||||||
writer.println("Exception: {} ({})", exception.getMessage(), exception.getClass().getSimpleName());
|
writer.println("Exception: {} ({})", exception.getMessage(), exception.getClass().getSimpleName());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue