feat: Added new docs
This commit is contained in:
@@ -4,6 +4,8 @@ sidebar_position: 10
|
||||
title: Channel Members
|
||||
---
|
||||
|
||||
Manipulating Members In A Channel
|
||||
|
||||
### Adding & Removing Channel Members
|
||||
|
||||
Using the addMembers() method adds the given users as members, while removeMembers() removes them.
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 6
|
||||
title: Creating Channels
|
||||
---
|
||||
|
||||
Create Channels In Your App
|
||||
|
||||
Both channel <b>channel.query</b> and <b>channel.watch</b> methods ensure that a channel exists and create one otherwise.
|
||||
If all you need is to ensure that a channel exists, you can use <b>channel.create</b>.
|
||||
Typically you use <b>channel.watch</b> client side and <b>channel.create</b> for a server side integration.
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 13
|
||||
title: Deleting And Hiding A Channel
|
||||
---
|
||||
|
||||
Remove Channels By Deleting Or Hiding
|
||||
|
||||
### Deleting a Channel
|
||||
|
||||
You can delete a Channel using the delete method. This marks the channel as deleted and hides all the content.
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 25
|
||||
title: Events
|
||||
---
|
||||
|
||||
Understand Low Level Messaging Events
|
||||
|
||||
Events allow the client to stay up to date with changes to the chat. Examples are a new message, a user's image that updated, a reaction, or a member joining the channel. There are a 4 different type of events. These first 2 types of events you receive if you're connected to Stream, no further action is needed to receive these events:
|
||||
|
||||
Client events: You always receive these events.
|
||||
|
||||
@@ -3,6 +3,7 @@ id: introduction
|
||||
sidebar_position: 1
|
||||
title: Introduction
|
||||
---
|
||||
Exploring the Basics of the stream_chat package (LLC)
|
||||
|
||||
<h2> Official Dart Client for Stream Chat </h2>
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 11
|
||||
title: Invites
|
||||
---
|
||||
|
||||
Invite A User To Join A Channel
|
||||
|
||||
### Inviting Users
|
||||
|
||||
Stream Chat provides the ability to invite users to a channel via the `channel` method with the `invites` array.
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 16
|
||||
title: Messages
|
||||
---
|
||||
|
||||
Send, Update And Delete Messages
|
||||
|
||||
Let's dive right into it, the example below shows how to send a simple message using Stream:
|
||||
|
||||
```dart
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 23
|
||||
title: Moderation Tools
|
||||
---
|
||||
|
||||
Moderation Tools For A Better Chat Experience
|
||||
|
||||
### Flag
|
||||
|
||||
Any user is allowed to flag a message.
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 12
|
||||
title: Muting Channels
|
||||
---
|
||||
|
||||
Muting Channels For Users
|
||||
|
||||
Messages added to a channel will not trigger push notifications, nor change the unread count for the users that muted it.
|
||||
|
||||
By default, mutes stay in place indefinitely until the user removes it; however, you can optionally set an expiration time.
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 15
|
||||
title: Channel Pagination
|
||||
---
|
||||
|
||||
Understanding Pagination For The Channel List
|
||||
|
||||
The channel query endpoint allows you to paginate the list of messages, watchers, and members for one channel.
|
||||
To make sure that you are able to retrieve a consistent list of messages, pagination does not work with simple offset/limit parameters but instead,
|
||||
it relies on passing the ID of the messages from the previous page.
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 22
|
||||
title: Pinned Messages
|
||||
---
|
||||
|
||||
Pinning A Message In A Channel
|
||||
|
||||
Pinned messages allow users to highlight important messages, make announcements, or temporarily promote content.
|
||||
Pinning a message is, by default, restricted to certain user roles, but this is flexible.
|
||||
Each channel can have multiple pinned messages and these can be created or updated with or without an expiration.
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 7
|
||||
title: Querying Channels
|
||||
---
|
||||
|
||||
More About Fetching A List Of Channels
|
||||
|
||||
If you’re building a similar application to Facebook Messenger or Intercom, you’ll want to show a list of Channels.
|
||||
The Chat API supports MongoDB style queries to make this easy to implement.
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ id: querying_users
|
||||
sidebar_position: 4
|
||||
title: Querying Users
|
||||
---
|
||||
Querying Users Across Channels
|
||||
|
||||
The Query Users method allows you to search for users and see if they are online/offline.
|
||||
The example below shows how you can retrieve the details for 3 users in one API call:
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 18
|
||||
title: Reactions
|
||||
---
|
||||
|
||||
Adding And Removing User Reactions
|
||||
|
||||
Stream Chat has built-in support for user Reactions. Common examples are likes, comments, loves, etc. Reactions can be customized so that you are able to use any type of reaction your application requires.
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 20
|
||||
title: Searching Messages
|
||||
---
|
||||
|
||||
Searching For Messages Across Channels
|
||||
|
||||
Message search is built-in to the chat API. You can enable and/or disable the search indexing on a per channel type.
|
||||
The command shown below selects the channels in which John is a member.
|
||||
Next, it searches the messages in those channels for the keyword “'supercalifragilisticexpialidocious'”:
|
||||
|
||||
@@ -4,3 +4,4 @@ sidebar_position: 2
|
||||
title: Setup
|
||||
---
|
||||
|
||||
Understanding Setup
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 21
|
||||
title: Silent Messages
|
||||
---
|
||||
|
||||
Pushing Silent Messages
|
||||
|
||||
Sometimes you want to add system or transactional messages to channels such as: "your ride is waiting for you",
|
||||
"James updated the information for the trip", "You and Jane are now matched" and so on.
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 14
|
||||
title: Slow Mode
|
||||
---
|
||||
|
||||
Using Slow Mode For Reduced Message Traffic
|
||||
|
||||
Slow mode helps reduce noise on a channel by limiting users to a maximum of 1 message per cooldown interval.
|
||||
|
||||
The cooldown interval is configurable and can be anything between 1 and 120 seconds. For instance, if you enable slow mode and set the cooldown interval to 30 seconds a user will be able to post at most 1 message every 30 seconds.
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 19
|
||||
title: Threads And Replies
|
||||
---
|
||||
|
||||
Creating And Paginating Threads
|
||||
|
||||
Threads and replies provide your users with a way to go into more detail about a specific topic.
|
||||
|
||||
This can be very helpful to keep the conversation organized and reduce noise.
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 24
|
||||
title: Typing Indicators
|
||||
---
|
||||
|
||||
Adding Typing Indicators To Your App
|
||||
|
||||
All official SDKs support typing events out of the box and are handled on all channels with the typing_events featured enabled.
|
||||
Typing indicators allow you to show to users who is currently typing in the channel.
|
||||
This feature can be switched on/off on a channel-type basis using the CLI or directly from the Dashboard.
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 9
|
||||
title: Updating Channels
|
||||
---
|
||||
|
||||
Exploring Multiple Ways To Update A Channel
|
||||
|
||||
There are two ways to update a channel using the Stream API - a partial or full update.
|
||||
A partial update will retain any custom key-value data, whereas a complete update is going to remove any that are unspecified in the API request.
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 17
|
||||
title: Uploading Files
|
||||
---
|
||||
|
||||
Uploading Files And Using A Custom CDN
|
||||
|
||||
The `channel.sendImage` and `channel.sendFile` methods make it easy to upload files.
|
||||
|
||||
This functionality defaults to using the Stream CDN. If you would like, you can easily change the logic to upload to your own CDN of choice.
|
||||
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 5
|
||||
title: User Presence
|
||||
---
|
||||
|
||||
Check If A User Is Online / Check Last Active
|
||||
|
||||
User presence allows you to show when a user was last active and if they are online right now.
|
||||
Whenever you read a user the data will look like this:
|
||||
|
||||
|
||||
@@ -4,3 +4,4 @@ sidebar_position: 3
|
||||
title: User Types
|
||||
---
|
||||
|
||||
Diving Into User Types
|
||||
@@ -4,6 +4,8 @@ sidebar_position: 8
|
||||
title: Watching Channels
|
||||
---
|
||||
|
||||
More About Watching A Channel
|
||||
|
||||
The call to channel.watch does a few different things in one API call:
|
||||
|
||||
* It creates the channel if it doesn't exist yet (if this user has the right permissions to create a channel)
|
||||
|
||||
Reference in New Issue
Block a user