Skip to content

Commit 4497383

Browse files
feat: sns (#113)
1 parent bbab28b commit 4497383

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

lib/GetStream/StreamChat/Client.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,15 @@ public function checkSqs(array $sqsSettings): StreamResponse
315315
return $this->post("check_sqs", $sqsSettings);
316316
}
317317

318+
/** Sends a test SNS push.
319+
* @link https://getstream.io/chat/docs/php/push_introduction/?language=php
320+
* @throws StreamException
321+
*/
322+
public function checkSns(array $snsSettings): StreamResponse
323+
{
324+
return $this->post("check_sns", $snsSettings);
325+
}
326+
318327
/** Updates or inserts users.
319328
* @link https://getstream.io/chat/docs/php/update_users/?language=php
320329
* @throws StreamException

tests/integration/IntegrationTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,17 @@ public function testCheckSqs()
183183
$this->assertTrue(array_key_exists("status", (array)$response));
184184
}
185185

186+
public function testCheckSns()
187+
{
188+
$response = $this->client->checkSns([
189+
"sns_topic_arn" => "arn:aws:sns:us-east-1:123456789012:sns-topic",
190+
"sns_key" => "key",
191+
"sns_secret" => "secret"
192+
]);
193+
194+
$this->assertTrue(array_key_exists("status", (array)$response));
195+
}
196+
186197
public function testGuestUser()
187198
{
188199
try {

0 commit comments

Comments
 (0)