File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
nodejs/basic-example/talkjs-frontend Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -13,24 +13,24 @@ const getUser = async (id) => {
1313
1414( async function ( ) {
1515 await Talk . ready ;
16- let agent = await getUser ( 1 ) ;
17- let user = await getUser ( 2 ) ;
16+ const alice = await getUser ( 1 ) ;
17+ const sebastian = await getUser ( 2 ) ;
1818 const session = new Talk . Session ( {
1919 appId : "<APP_ID>" , // replace with your app ID
20- me : user ,
20+ me : sebastian ,
2121 } ) ;
22- var conversation = session . getOrCreateConversation (
22+ const conversation = session . getOrCreateConversation (
2323 "nodeJSExampleConversation"
2424 ) ;
2525 conversation . setAttributes ( {
2626 welcomeMessages : [
2727 "Example chat for our Node.js tutorial. Try sending a message!" ,
2828 ] ,
2929 } ) ;
30- conversation . setParticipant ( user ) ;
31- conversation . setParticipant ( agent ) ;
30+ conversation . setParticipant ( alice ) ;
31+ conversation . setParticipant ( sebastian ) ;
3232
33- var chatbox = session . createChatbox ( conversation ) ;
33+ const chatbox = session . createChatbox ( conversation ) ;
3434 chatbox . select ( conversation ) ;
3535 chatbox . mount ( document . getElementById ( "talkjs-container" ) ) ;
3636} ) ( ) ;
You can’t perform that action at this time.
0 commit comments