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:
-
The event object which in this case is the
UserReceivedChannelInviteEventobject. 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.
-
A
Contextobject.
note
This is a non-blocking chat function.