Join / Leave Channel

1. Join Channel

await client.joinChannel({
    channelId: 'some_public_channel',
});

2. Join InvitationOnly Channel

await client.joinChannelByInvitationCode({
    channelId: 'some_invitation_only_channel',
    invitationCode: 'secret_phrase',
});

3. Leave Channel

await client.leaveChannel({channelId: 'some_channel'});
await client.leaveChannel({
	channelId: 'some_channel', 
	deleteChannelIfEmpty: true, // if I am the last member, channel will be deleted when I leave
});

Last updated