@@ -53,6 +53,7 @@ import {
53
53
generateAutoCaptions ,
54
54
} from './util/muxApi' ;
55
55
import Sidebar from './locations/Sidebar' ;
56
+ import { APP_ORGANIZATION_ID , isMarketplaceVersion } from './util/constants' ;
56
57
57
58
const delay = ( ms : number ) => new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ;
58
59
@@ -104,6 +105,7 @@ export class App extends React.Component<AppProps, AppState> {
104
105
muxPlayerRef = React . createRef < any > ( ) ; // eslint-disable-line @typescript-eslint/no-explicit-any
105
106
getSignedTokenActionId : string ;
106
107
private pollPending = false ;
108
+ orgId : string ;
107
109
108
110
constructor ( props : AppProps ) {
109
111
super ( props ) ;
@@ -151,6 +153,10 @@ export class App extends React.Component<AppProps, AppState> {
151
153
storyboardToken : undefined ,
152
154
raw : undefined ,
153
155
} ;
156
+
157
+ this . orgId = isMarketplaceVersion ( { appId : this . props . sdk . ids . app } )
158
+ ? APP_ORGANIZATION_ID
159
+ : this . props . sdk . ids . organization ;
154
160
}
155
161
156
162
// eslint-disable-next-line @typescript-eslint/ban-types
@@ -207,7 +213,7 @@ export class App extends React.Component<AppProps, AppState> {
207
213
208
214
async componentDidMount ( ) {
209
215
const appActionsResponse = await this . cmaClient . appAction . getMany ( {
210
- organizationId : this . props . sdk . ids . organization ,
216
+ organizationId : this . orgId ,
211
217
appDefinitionId : this . props . sdk . ids . app ! ,
212
218
} ) ;
213
219
this . getSignedTokenActionId =
@@ -503,7 +509,7 @@ export class App extends React.Component<AppProps, AppState> {
503
509
response : { body } ,
504
510
} = await this . cmaClient . appActionCall . createWithResponse (
505
511
{
506
- organizationId : this . props . sdk . ids . organization ,
512
+ organizationId : this . orgId ,
507
513
appDefinitionId : this . props . sdk . ids . app ! ,
508
514
appActionId : this . getSignedTokenActionId ,
509
515
} ,
0 commit comments