Join / Leave Channel

1. Join Channel

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

TalkPlusApi.JoinChannel(channelId, (TPChannel tpChannel) => {
   // SUCCESS
}, (int statusCode, Exception e) => {
   // FAILURE
});

2. Join InvitationOnly Channel

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

TalkPlusApi.JoinChannel(channelId, invitationCode, (TPChannel tpChannel) => {
   // SUCCESS
}, (int statusCode, Exception e) => {
   // FAILURE
});

3. Leave Channel

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

TalkPlusApi.LeaveChannel(channel, deleteChannelIfEmpty, () => {
   // SUCCESS
}, (int statusCode, Exception e) => {
   // FAILURE
});

Last updated