Channel User Events

channel:user:join

The channel:user:join event is sent to connected clients that have joined a channel and subscribed to the channel. The event is sent when a user joins a channel (by accepting an invite).

An example payload for this event:

{
  "event": "channel:user:join",
  "data": {
    "name": "Group User",
    "id": "9ded74f9-42e4-4e70-86aa-44ba4cd2c782",
    "channel_id": "2115543f-c236-4f81-a548-719b0929c465",
    "avatar_url": "https://gravatar.com/avatar/06aaff5772de7ecffbfae48831b2190d?s=200"
    "read": true,
    "write": true,
    "admin": false,
    "invited": true,
    "requested": true
  }
}

channel:user:update

The channel:user:update event is sent to connected clients that have joined a channel and subscribed to the channel. The event is sent when a user that has joined a channel has their details updated.

An example payload for this event:

{
  "event": "channel:user:update",
  "data": {
    "name": "Updated User",
    "id": "9ded74f9-42e4-4e70-86aa-44ba4cd2c782",
    "channel_id": "2115543f-c236-4f81-a548-719b0929c465",
    "avatar_url": "https://gravatar.com/avatar/06aaff5772de7ecffbfae48831b2190d?s=200"
    "read": true,
    "write": true,
    "admin": false,
    "invited": true,
    "requested": true
  }
}

channel:user:invite

The channel:user:invite event is sent to connected clients that have joined a channel and subscribed to the channel. The event is sent when a user is invited to a channel.

An example payload for this event:

{
  "event": "channel:user:invite",
  "data": {
    "name": "Invited User",
    "id": "9ded74f9-42e4-4e70-86aa-44ba4cd2c782",
    "channel_id": "2115543f-c236-4f81-a548-719b0929c465",
    "avatar_url": "https://gravatar.com/avatar/06aaff5772de7ecffbfae48831b2190d?s=200"
    "read": true,
    "write": true,
    "admin": false,
    "invited": true,
    "requested": false
  }
}

channel:user:request

The channel:user:request event is sent to connected clients for admin users that have joined a channel and subscribed to the channel. The event is sent when a user requests access to a channel.

An example payload for this event:

{
  "event": "channel:user:request",
  "data": {
    "name": "Requested User",
    "id": "9ded74f9-42e4-4e70-86aa-44ba4cd2c782",
    "channel_id": "2115543f-c236-4f81-a548-719b0929c465",
    "avatar_url": "https://gravatar.com/avatar/06aaff5772de7ecffbfae48831b2190d?s=200"
    "read": true,
    "write": true,
    "admin": false,
    "invited": false,
    "requested": true
  }
}

channel:user:leave

The channel:user:leave event is sent to connected clients that have joined a channel and subscribed to the channel. The event is sent when a user leaves a channel.

An example payload for this event:

{
  "event": "channel:user:leave",
  "data": {
    "id": "9ded74f9-42e4-4e70-86aa-44ba4cd2c782",
    "channel_id": "2115543f-c236-4f81-a548-719b0929c465",
    "requested": true,
    "invited": true
  }
}

The requested and invited fields are available so that the way the user left/was removed from the channel can be determined.

Event Requested Invited
User leaves a channel true true
Admin removes a user from a channel true true
User declines a channel invite false true
User cancels a channel request true false
User has their request declined true false