Rename username to account

This commit is contained in:
AsamK 2021-11-12 16:38:55 +01:00
parent 398cddaf29
commit 8aab644db9
14 changed files with 245 additions and 218 deletions

View file

@ -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('+', '_');
}
}

View file

@ -49,13 +49,13 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
"The users 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 {

View file

@ -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);