@@ -100,6 +100,10 @@ qx.Class.define("osparc.support.Conversation", {
100100 prePostMessagePromise = this . __postMessage ( msg ) ;
101101 // rename the conversation
102102 newConversation . renameConversation ( "Book a Call" ) ;
103+ // share project if needed
104+ if ( bookACallInfo [ "share-project" ] && currentStudy ) {
105+ this . __shareProjectWithSupport ( true ) ;
106+ }
103107 }
104108 prePostMessagePromise
105109 . then ( ( ) => {
@@ -168,16 +172,15 @@ qx.Class.define("osparc.support.Conversation", {
168172 isAlreadyShared = false ;
169173 }
170174 shareProjectCB . setValue ( isAlreadyShared ) ;
171- shareProjectCB . removeListener ( "changeValue" , this . __shareProjectWithSupport , this ) ;
175+ shareProjectCB . removeListener ( "changeValue" , e => this . __shareProjectWithSupport ( e . getData ( ) ) , this ) ;
172176 if ( showCB ) {
173- shareProjectCB . addListener ( "changeValue" , this . __shareProjectWithSupport , this ) ;
177+ shareProjectCB . addListener ( "changeValue" , e => this . __shareProjectWithSupport ( e . getData ( ) ) , this ) ;
174178 }
175179 } ) ;
176180 }
177181 } ,
178182
179- __shareProjectWithSupport : function ( e ) {
180- const share = e . getData ( ) ;
183+ __shareProjectWithSupport : function ( share ) {
181184 const supportGroupId = osparc . store . Groups . getInstance ( ) . getSupportGroup ( ) . getGroupId ( ) ;
182185 const projectId = this . getConversation ( ) . getContextProjectId ( ) ;
183186 osparc . store . Study . getInstance ( ) . getOne ( projectId )
0 commit comments