Skip to content

Commit

Permalink
feat: sns (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
totalimmersion authored Sep 4, 2024
1 parent bbab28b commit 4497383
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/GetStream/StreamChat/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,15 @@ public function checkSqs(array $sqsSettings): StreamResponse
return $this->post("check_sqs", $sqsSettings);
}

/** Sends a test SNS push.
* @link https://getstream.io/chat/docs/php/push_introduction/?language=php
* @throws StreamException
*/
public function checkSns(array $snsSettings): StreamResponse
{
return $this->post("check_sns", $snsSettings);
}

/** Updates or inserts users.
* @link https://getstream.io/chat/docs/php/update_users/?language=php
* @throws StreamException
Expand Down
11 changes: 11 additions & 0 deletions tests/integration/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,17 @@ public function testCheckSqs()
$this->assertTrue(array_key_exists("status", (array)$response));
}

public function testCheckSns()
{
$response = $this->client->checkSns([
"sns_topic_arn" => "arn:aws:sns:us-east-1:123456789012:sns-topic",
"sns_key" => "key",
"sns_secret" => "secret"
]);

$this->assertTrue(array_key_exists("status", (array)$response));
}

public function testGuestUser()
{
try {
Expand Down

0 comments on commit 4497383

Please sign in to comment.