Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use signal-cli-dbus-rest-api over abandoned signal-web-gateway. #481

Merged

Conversation

rotdrop
Copy link
Contributor

@rotdrop rotdrop commented Feb 12, 2022

@rotdrop rotdrop force-pushed the bugfix/obsolete-signal-web-gateway branch from af6fd48 to 59f195c Compare February 12, 2022 16:58
@rotdrop
Copy link
Contributor Author

rotdrop commented Feb 12, 2022

The test-suite needs to be updated:

This version of Nextcloud requires at least PHP 7.4<br/>You are currently running 7.3.33-1+ubuntu20.04.1+deb.sury.org+1. Please update your PHP version.

);
$body = $response->getBody();
$json = json_decode($body, true);
// determine type of gateway
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment necessary?

// determine type of gateway
$response = $client->get($this->config->getUrl() . '/v1/about');
if ($response->getStatusCode() === 200) {
// New style gateway https://gitlab.com/morph027/signal-cli-dbus-rest-api
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment necessary?

throw new SmsTransmissionException("error reported by Signal gateway, status=$status, body=$body}");
}
} else {
// Try old deprecated gateway https://gitlab.com/morph027/signal-web-gateway
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment necessary?

@@ -91,7 +91,7 @@ public function startSetup(IUser $user, string $gatewayName, string $identifier)
try {
$gateway->send($user, $identifier, "$verificationNumber is your Nextcloud verification code.");
} catch (SmsTransmissionException $ex) {
throw new VerificationTransmissionException('could not send verification code');
throw new VerificationTransmissionException('could not send verification code', $ex->getCode(), $ex);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a place of code using the 2th and 3th argument?

@vitormattos vitormattos merged commit e09474a into nextcloud:master May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support for https://github.com/bbernhard/signal-cli-rest-api
2 participants