File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 77
88 onMount (async () => {
99 Talk .ready .then (() => {
10- const me = new Talk.User (oliver);
11- const other = new Talk.User (abby);
10+ const session = new Talk.Session ({
11+ appId: appId,
12+ userId: oliver .id ,
13+ });
14+ session .currentUser .createIfNotExists (oliver);
1215
13- const session = new Talk.Session ({ appId, me });
16+ const otherRef = session .user (abby .id );
17+ otherRef .createIfNotExists (abby);
1418
15- const conversationId = Talk .oneOnOneId (me, other);
16- const conversation = session .getOrCreateConversation (conversationId);
17- conversation .setParticipant (me);
18- conversation .setParticipant (other);
19+ const conversationRef = session .conversation (' svelte_example_conversation' );
20+ conversationRef .createIfNotExists ();
21+ conversationRef .participant (otherRef).createIfNotExists ();
1922
2023 const chatbox = session .createChatbox ();
21- chatbox .select (conversation );
24+ chatbox .select (conversationRef );
2225 chatbox .mount (element);
2326 });
2427 });
You can’t perform that action at this time.
0 commit comments