Skip to main content

User received channel invite

This function is triggered when a user is invited by another user to join a channel.

async function handleEvent(event: UserReceivedChannelInviteEvent, context: Context) {
}

The above function takes two parameters:

  1. The event object which in this case is the UserReceivedChannelInviteEvent object. This object has three properties:

    • user: The user who received the invite.
    • channel: The channel that this user has been invited to join.
    • invitingUser: The user that sent the invite.
  2. A Context object.

note

This is a non-blocking chat function.