File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed
services/static-webserver/client/source/class/osparc/support Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -173,15 +173,22 @@ qx.Class.define("osparc.support.SupportCenter", {
173173 const conversationPage = this . getChildControl ( "conversation-page" ) ;
174174 conversationPage . setConversation ( null ) ;
175175 this . __showConversation ( ) ;
176- conversationPage . addListenerOnce ( "changeConversation" , e => {
177- const conversation = e . getData ( ) ;
178- // update conversation name and patch extra_context
179- conversation . renameConversation ( "Book a call" ) ;
180- conversation . patchExtraContext ( {
181- "appointment" : "requested"
176+ conversationPage . postMessage ( osparc . support . SupportCenter . REQUEST_CALL_MESSAGE )
177+ . then ( data => {
178+ const conversationId = data [ "conversationId" ] ;
179+ osparc . store . ConversationsSupport . getInstance ( ) . getConversation ( conversationId )
180+ . then ( conversation => {
181+ const conversation = e . getData ( ) ;
182+ // update conversation name and patch extra_context
183+ conversation . renameConversation ( "Book a call" ) ;
184+ conversation . patchExtraContext ( {
185+ "appointment" : "requested"
186+ } ) ;
187+ } ) ;
188+ } )
189+ . catch ( err => {
190+ console . error ( "Error sending request call message" , err ) ;
182191 } ) ;
183- } ) ;
184- conversationPage . postMessage ( osparc . support . SupportCenter . REQUEST_CALL_MESSAGE ) ;
185192 } ,
186193 }
187194} ) ;
You can’t perform that action at this time.
0 commit comments