Join / Leave Channel

1. Join Channel

circle-info

Anyone can join a public channel even without invitation from the owner.

TPChannel? channel = await TalkPlusAPI.joinChannel(
    channelId,
    errorCallback: (errorCode, errorMessage){}
);

2. Join InvitationOnly Channel

circle-info

In order to join an invitationOnly channel, you need to know the channel’s invitationCode.

TPChannel? channel = await TalkPlusAPI.joinChannelInvitation(
    channelId, 
    invitationCode,
    errorCallback: (errorCode, errorMessage){}
);

3. Leave Channel

circle-info

If you are the last remaining channel member and you set deleteChannelIfEmpty parameter to true when leaving the channel, the channel will be deleted.

await TalkPlusAPI.leaveChannel(
    tpChannel, 
    deleteChannelIfEmpty,
    errorCallback: (errorCode, errorMessage){}
);

Last updated