File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,6 +99,16 @@ Fliplet.Hooks.on('beforeChatContactsRendering', function onBeforeChatContactsRen
9999
100100## Private conversations
101101
102+ ### Get the list of conversations for the current user
103+
104+ ``` js
105+ Fliplet .Chat .get ().then (function (chat ) {
106+ return chat .conversations ();
107+ }).then (function (conversations ) {
108+ // ...
109+ });
110+ ```
111+
102112### Create a new private conversation with a group of people
103113
104114Use the Fliplet Chat JS APIs from the chat screen to create a new private conversation between multiple people.
@@ -108,11 +118,11 @@ You do not need to list the current user's entry ID in the list of participants,
108118``` js
109119Fliplet .Chat .get ().then (function (chat ) {
110120 return chat .create ({
111- name: ' Running team' , // Group name
121+ name: ' Running team' , // Conversation name
112122 participants: [1 , 2 , 3 ] // List of Data source entry ID for the participants
113123 });
114- }).then (function (channel ) {
115- // Group has been created
124+ }).then (function (conversation ) {
125+ // The conversation has been created
116126});
117127```
118128
You can’t perform that action at this time.
0 commit comments