Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MengyiGong committed Sep 12, 2024
1 parent ee5ab0d commit 0fedde4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/teams-test-app/src/pages/TestApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export const TestApp: React.FC = () => {
return (
<>
<div className="App-container">
<ExternalAppCardActionsForCECAPIs />
<AppAPIs />
<AppInitializationAPIs />
<AppInstallDialogAPIs />
Expand All @@ -92,6 +91,7 @@ export const TestApp: React.FC = () => {
<DialogUrlParentCommunicationAPIs childWindowRef={dialogWindowRef} />
<ExternalAppAuthenticationAPIs />
<ExternalAppCardActionsAPIs />
<ExternalAppCardActionsForCECAPIs />
<ExternalAppCommandsAPIs />
<FilesAPIs />
<FullTrustAPIs />
Expand Down
11 changes: 6 additions & 5 deletions packages/teams-js/src/private/externalAppCardActionsForCEC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ export namespace externalAppCardActionsForCEC {
throw errorNotSupportedOnPlatform;
}
validateId(appId, new Error('App id is not valid.'));
validateId(conversationId, new Error('conversation id is not valid.'));
return sendMessageToParentAsync<
[externalAppCardActions.ActionOpenUrlError, externalAppCardActions.ActionOpenUrlType]
>(
getApiVersionTag(
externalAppCardActionsTelemetryVersionNumber,
ApiName.ExternalAppCardActions_ProcessActionOpenUrl,
ApiName.ExternalAppCardActionsForCEC_ProcessActionOpenUrl,
),
'externalAppCardActions.cec.processActionOpenUrl',
'externalAppCardActionsForCEC.processActionOpenUrl',
[appId, url.href, conversationId],
).then(
([error, response]: [externalAppCardActions.ActionOpenUrlError, externalAppCardActions.ActionOpenUrlType]) => {
Expand All @@ -54,13 +55,13 @@ export namespace externalAppCardActionsForCEC {
throw errorNotSupportedOnPlatform;
}
validateId(appId, new Error('App id is not valid.'));

validateId(conversationId, new Error('conversation id is not valid.'));
return sendMessageToParentAsync<[boolean, externalAppCardActions.ActionSubmitError]>(
getApiVersionTag(
externalAppCardActionsTelemetryVersionNumber,
ApiName.ExternalAppCardActions_ProcessActionSubmit,
ApiName.ExternalAppCardActionsForCEC_ProcessActionSubmit,
),
'externalAppCardActions.cec.processActionSubmit',
'externalAppCardActionsForCEC.processActionSubmit',
[appId, conversationId, actionSubmitPayload],
).then(([wasSuccessful, error]: [boolean, externalAppCardActions.ActionSubmitError]) => {
if (!wasSuccessful) {
Expand Down

0 comments on commit 0fedde4

Please sign in to comment.