Skip to content

Instantly share code, notes, and snippets.

@enricop89
Created December 21, 2018 09:07
Show Gist options
  • Save enricop89/05c980181890ccb40c4e9e15a3edaa64 to your computer and use it in GitHub Desktop.
Save enricop89/05c980181890ccb40c4e9e15a3edaa64 to your computer and use it in GitHub Desktop.
User connected Event
const Client = BandyerChat.create({
userAlias: 'usr_123456',
appId: 'wAppId_fake123456',
environment: 'sandbox',
hidden: false,
screenSharingExtensionId: 'id of your screen sharing extension'
});
Client.on('user_connected',(user) => {
if (user.role === 'group_b'){ // your custom logic
BandyerChat.addChat(user.id)
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment