1
0
Fork 0
mirror of synced 2024-09-29 08:51:28 +13:00
This commit is contained in:
Jake Barnby 2024-02-24 00:01:46 +13:00
parent 8742bfaee8
commit d311f88307
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -341,6 +341,17 @@ trait MessagingBase
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertEquals('android-app', $response['body']['name']);
$response2 = $this->client->call(Client::METHOD_PATCH, '/messaging/topics/' . $topics['private']['$id'], [
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey'],
], [
'name' => 'ios-app',
'subscribe' => [Role::user('some-user')->toString()],
]);
$this->assertEquals(200, $response2['headers']['status-code']);
$this->assertEquals('ios-app', $response2['body']['name']);
return $response['body']['$id'];
}