diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-08-22 09:24:37 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-08-22 09:24:37 +0300 |
commit | e023eb7f5fa0a1eb3f2ec644340ace630a6d488a (patch) | |
tree | eca051bbff853727d8ead7cafae9670427a825fc | |
parent | 8525833a2b577921949cf20b079f5639b8f6627e (diff) |
Use Signal gateway URL from config
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r-- | lib/Service/Gateway/Signal/Gateway.php | 18 |
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); |