Invites
Confused about "Invites"?
Let us know how we can improve our documentation:
Inviting Users
Copied!Confused about "Inviting Users"?
Let us know how we can improve our documentation:
Stream Chat provides the ability to invite users to a channel. Upon invitation, the end-user will receive a notification that they were invited to the specified channel.
See the following for an example on how to invite a user by user ID:
Accepting an Invite
Copied!Confused about "Accepting an Invite"?
Let us know how we can improve our documentation:
In order to accept an invite, you must use call the acceptInvite
method. The acceptInvite
method accepts an object with an optional message
property. Please see below for an example of how to call acceptInvite
:
message
can be used for system messages for display within the channel (e.g. "Nick joined this channel!"). Rejecting an Invite
Copied!Confused about "Rejecting an Invite"?
Let us know how we can improve our documentation:
To reject an invite, call the rejectInvite
method. This method does not require a user ID as it pulls the user ID from the current session in store from the connectUser
call.
Query for Accepted Invites
Copied!Confused about "Query for Accepted Invites"?
Let us know how we can improve our documentation:
Querying for accepted invites is done via the queryChannels
method. This allows you to return a list of accepted invites with a single call. See below for an example:
Query for Rejected Invites
Copied!Confused about "Query for Rejected Invites"?
Let us know how we can improve our documentation:
Similar to querying for accepted invites, you can query for rejected invites with queryChannels
. See below for an example:
Query for Pending Invites
Copied!Confused about "Query for Pending Invites"?
Let us know how we can improve our documentation:
Similar to querying for accepted and rejected invites, you can query for pending invites with queryChannels
. See below for an example: