File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
services/static-webserver/client/source/class/osparc/support Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -151,17 +151,23 @@ qx.Class.define("osparc.support.Conversation", {
151151 osparc . store . ConversationsSupport . getInstance ( ) . postConversation ( extraContext )
152152 . then ( data => {
153153 const postMessagePromises = [ ] ;
154+ let isBookACall = false ;
155+ // make these checks first, setConversation will reload messages
154156 if (
155157 this . __messages . length === 1 &&
156158 this . __messages [ 0 ] [ "systemMessageType" ] &&
157159 osparc . support . Conversation . SYSTEM_MESSAGE_TYPE . BOOK_A_CALL
158160 ) {
161+ isBookACall = true ;
162+ }
163+ const newConversation = new osparc . data . model . Conversation ( data ) ;
164+ this . setConversation ( newConversation ) ;
165+ if ( isBookACall ) {
159166 // add a first message
160167 postMessagePromises . push ( this . __postMessage ( "Book a Call" ) ) ;
161168 // rename the conversation
169+ newConversation . renameConversation ( "Book a Call" ) ;
162170 }
163- const newConversation = new osparc . data . model . Conversation ( data ) ;
164- this . setConversation ( newConversation ) ;
165171 postMessagePromises . push ( this . __postMessage ( content ) ) ;
166172 Promise . all ( postMessagePromises )
167173 . then ( ( ) => {
You can’t perform that action at this time.
0 commit comments