Skip to content

Instantly share code, notes, and snippets.

@shriyaRam
Created June 14, 2020 13:07
Show Gist options
  • Save shriyaRam/56ee8799225a449c636cbf31c8146254 to your computer and use it in GitHub Desktop.
Save shriyaRam/56ee8799225a449c636cbf31c8146254 to your computer and use it in GitHub Desktop.
joinbtn.addEventListener("click", ()=>{
//join a channel
const channel = client.createChannel(chid.value); //pass your channel ID
channel.join().then(() => {
/* Your code for handling the event of a join-channel success. */
console.log('Channel joined!');
}).catch(error => {
/* Your code for handling the event of a join-channel failure. */
console.log('Channel join failed.');
});
flag = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment