-
Notifications
You must be signed in to change notification settings - Fork 63
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
Use signal-cli-dbus-rest-api over abandoned signal-web-gateway. #481
Conversation
See https://gitlab.com/morph027/signal-cli-dbus-rest-api. Signed-off-by: Claus-Justus Heine <[email protected]>
af6fd48
to
59f195c
Compare
The test-suite needs to be updated:
|
); | ||
$body = $response->getBody(); | ||
$json = json_decode($body, true); | ||
// determine type of gateway |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
See https://gitlab.com/morph027/signal-cli-dbus-rest-api.
This would fix #478.
I have read #454