mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Rename username to account
This commit is contained in:
parent
398cddaf29
commit
8aab644db9
14 changed files with 245 additions and 218 deletions
|
@ -13,11 +13,11 @@ public class DbusConfig {
|
|||
return getObjectPath(null);
|
||||
}
|
||||
|
||||
public static String getObjectPath(String username) {
|
||||
if (username == null) {
|
||||
public static String getObjectPath(String account) {
|
||||
if (account == null) {
|
||||
return SIGNAL_OBJECT_BASE_PATH;
|
||||
}
|
||||
|
||||
return SIGNAL_OBJECT_BASE_PATH + "/" + username.replace('+', '_');
|
||||
return SIGNAL_OBJECT_BASE_PATH + "/" + account.replace('+', '_');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,13 +49,13 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
|
|||
"The user’s key is untrusted, either the user has reinstalled Signal or a third party sent this message.");
|
||||
final var recipientName = e.getSender().getLegacyIdentifier();
|
||||
writer.println(
|
||||
"Use 'signal-cli -u {} listIdentities -n {}', verify the key and run 'signal-cli -u {} trust -v \"FINGER_PRINT\" {}' to mark it as trusted",
|
||||
"Use 'signal-cli -a {} listIdentities -n {}', verify the key and run 'signal-cli -a {} trust -v \"FINGER_PRINT\" {}' to mark it as trusted",
|
||||
m.getSelfNumber(),
|
||||
recipientName,
|
||||
m.getSelfNumber(),
|
||||
recipientName);
|
||||
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 -a {} trust -a {}' to trust it without verification",
|
||||
m.getSelfNumber(),
|
||||
recipientName);
|
||||
} else {
|
||||
|
|
|
@ -53,7 +53,7 @@ public class DbusSignalControlImpl implements org.asamk.SignalControl {
|
|||
) throws Error.Failure, Error.InvalidNumber {
|
||||
if (!Manager.isValidNumber(number, null)) {
|
||||
throw new SignalControl.Error.InvalidNumber(
|
||||
"Invalid username (phone number), make sure you include the country code.");
|
||||
"Invalid account (phone number), make sure you include the country code.");
|
||||
}
|
||||
try (final RegistrationManager registrationManager = c.getNewRegistrationManager(number)) {
|
||||
registrationManager.register(voiceVerification, captcha);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue