File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed 
services/static-webserver/client/source/class/osparc/support Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -150,9 +150,20 @@ qx.Class.define("osparc.support.Conversation", {
150150          } 
151151          osparc . store . ConversationsSupport . getInstance ( ) . postConversation ( extraContext ) 
152152            . then ( data  =>  { 
153+               const  postMessagePromises  =  [ ] ; 
154+               if  ( 
155+                 this . __messages . length  ===  1  && 
156+                 this . __messages [ 0 ] [ "systemMessageType" ]  && 
157+                 osparc . support . Conversation . SYSTEM_MESSAGE_TYPE . BOOK_A_CALL 
158+               )  { 
159+                 // add a first message 
160+                 postMessagePromises . push ( this . __postMessage ( "Book a Call" ) ) ; 
161+                 // rename the conversation 
162+               } 
153163              const  newConversation  =  new  osparc . data . model . Conversation ( data ) ; 
154164              this . setConversation ( newConversation ) ; 
155-               this . __postMessage ( content ) 
165+               postMessagePromises . push ( this . __postMessage ( content ) ) ; 
166+               Promise . all ( postMessagePromises ) 
156167                . then ( ( )  =>  { 
157168                  this . addSystemMessage ( "followUp" ) ; 
158169                } ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments