Skip to content

Commit

Permalink
Add updateParticipation to docs, clean up docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nik Spyratos committed Jul 21, 2021
1 parent c3c77d1 commit b873055
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ $filters = [
```php
$appId = 'YOUR_APP_ID';
$secretKey = 'YOUR_SECRET_KEY';
$talkJSClient = new TalkJSClient($appId, $secretKey)
$talkJSClient = new TalkJSClient($appId, $secretKey);
```

### Users
Expand Down Expand Up @@ -158,6 +158,13 @@ $talkJSClient->conversations->leave('my_conversation_id', 'my_user_id');
$talkJSClient->conversations->delete('my_conversation_id');
```

- Update participation settings (notifications and read/write access)
```php
$notify = true; // Boolean, default true
$access = 'ReadWrite'; // ReadWrite or Read, default ReadWrite
$talkJSClient->conversations->updateParticipation('my_conversation_id', 'my_user_id', $notify, $access);
```

### Messages

For more information on custom data and filters, please refer to the TalkJS documentation linked above.
Expand All @@ -179,7 +186,7 @@ $talkJSClient->messages->get('my_conversation_id', $filters);

- Find specific message in a conversation
```php
$talkJSClient->messages->find('my_conversation_id', 'message_id', $filters);
$talkJSClient->messages->find('my_conversation_id', 'message_id');
```

- Post a system message, returns a `MessageCreated` event class with input data and `type` of `SystemMessage`
Expand Down

0 comments on commit b873055

Please sign in to comment.