mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-06 06:00:38 +00:00
DBus listen(number<s>) and daemon \-\-number
implement listen method for DBus listen(number<s>) -> <>:: add \-\-number option to daemon subcommand - permits starting daemon in anonymous mode with zero or more numbers - numbers may be added to daemon with listen() and removed with unlisten() change misleading "dataPath" to `settingsPath` in App.java - settingsPath=~/.local/share/signal-cli, while dataPath=~/.local/share/signal-cli/data only use FileLock when necessary in App.java, and unlock when appropriate update documentation
This commit is contained in:
parent
26594dd0ee
commit
690636b83d
12 changed files with 317 additions and 64 deletions
|
@ -94,6 +94,8 @@ public interface Manager extends Closeable {
|
|||
|
||||
void checkAccountState() throws IOException;
|
||||
|
||||
SignalAccount getAccount();
|
||||
|
||||
Map<String, Pair<String, UUID>> areUsersRegistered(Set<String> numbers) throws IOException;
|
||||
|
||||
void updateAccountAttributes(String deviceName) throws IOException;
|
||||
|
|
|
@ -247,6 +247,11 @@ public class ManagerImpl implements Manager {
|
|||
return account.getUsername();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SignalAccount getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkAccountState() throws IOException {
|
||||
if (account.getLastReceiveTimestamp() == 0) {
|
||||
|
|
|
@ -116,8 +116,9 @@ public class RegistrationManager implements Closeable {
|
|||
return new RegistrationManager(account, pathConfig, serviceConfiguration, userAgent);
|
||||
}
|
||||
|
||||
public void register(boolean voiceVerification, String captcha) throws IOException {
|
||||
public void register(boolean voiceVerification, String captchaString) throws IOException {
|
||||
final ServiceResponse<RequestVerificationCodeResponse> response;
|
||||
final var captcha = captchaString == null ? null : captchaString.replace("signalcaptcha://", "");
|
||||
if (voiceVerification) {
|
||||
response = accountManager.requestVoiceVerificationCode(getDefaultLocale(),
|
||||
Optional.fromNullable(captcha),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue