Skip to content

Commit 044006a

Browse files
committed
Few more fixes
1 parent b15dadb commit 044006a

File tree

1 file changed

+7
-7
lines changed
  • nodejs/basic-example/talkjs-frontend

1 file changed

+7
-7
lines changed

nodejs/basic-example/talkjs-frontend/script.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff 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
})();

0 commit comments

Comments
 (0)