On this page

Join channels

Requires App Context

Enable App Context on your keyset in the Admin Portal to manage memberships.

Use Join() to connect a user to a channel and create a membership. The user can receive messages and is recorded as a channel member.

After joining, the OnMessageReceived event is triggered when a message is received. Handle this event to receive messages.

Method signature

This method has the following signature:

1channel.Join(ChatMembershipData? membershipData = null)

Event signature

1public event Action<Message> OnMessageReceived;

Event handler signature

1void EventHandler(Message message)
* required
ParameterDescription
message *
Type: Message
Default:
n/a
The received message.

Output

This method returns an awaitable Task<ChatOperationResult>. To receive a message, you must handle the OnMessageReceived event.

Sample code

Join the support channel.

1

Last updated on