Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/twofactor_gateway.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2018-08-22 09:24:37 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2018-08-22 09:24:37 +0300
commite023eb7f5fa0a1eb3f2ec644340ace630a6d488a (patch)
treeeca051bbff853727d8ead7cafae9670427a825fc
parent8525833a2b577921949cf20b079f5639b8f6627e (diff)
Use Signal gateway URL from config
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--lib/Service/Gateway/Signal/Gateway.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Service/Gateway/Signal/Gateway.php b/lib/Service/Gateway/Signal/Gateway.php
index a716109..c3c77f0 100644
--- a/lib/Service/Gateway/Signal/Gateway.php
+++ b/lib/Service/Gateway/Signal/Gateway.php
@@ -62,16 +62,16 @@ class Gateway implements IGateway {
* @throws SmsTransmissionException
*/
public function send(IUser $user, string $identifier, string $message) {
- // TODO: make configurable
- $endpoint = 'http://localhost:5000';
-
$client = $this->clientService->newClient();
- $response = $client->post($endpoint, [
- 'body' => [
- 'to' => $identifier,
- 'message' => $message,
- ],
- ]);
+ $response = $client->post(
+ $this->config->getUrl(),
+ [
+ 'body' => [
+ 'to' => $identifier,
+ 'message' => $message,
+ ],
+ ]
+ );
$body = $response->getBody();
$json = json_decode($body, true);