Skip to content

Commit

Permalink
fix(ActivitiesSdkAdapter): properly transform an activity card into a…
Browse files Browse the repository at this point in the history
…n activity attachment
  • Loading branch information
karinasigartau0798 authored and cipak committed Mar 10, 2022
1 parent 41746e3 commit 424c4c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ActivitiesSDKAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function parseSDKAttachments(sdkActivity) {
sdkActivity.object.cards.forEach((c) => {
const card = JSON.parse(c);

attachments.push(card);
attachments.push({contentType: 'application/vnd.microsoft.card.adaptive', content: card});
});
}
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/mockSdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export const mockSDKAttachmentAction = {
export const activityWithCard = {
object: {
cards: [
'{"contentType":"application/vnd.microsoft.card.adaptive","content":{"$schema":"http://adaptivecards.io/schemas/adaptive-card.json","type":"AdaptiveCard","version":"1.2","body":[{"type":"TextBlock","text":"Adaptive Cards","size":"large"}],"actions":[{"type":"Action.OpenUrl","url":"http://adaptivecards.io","title":"Learn More"}]}}',
'{"$schema":"http://adaptivecards.io/schemas/adaptive-card.json","type":"AdaptiveCard","version":"1.2","body":[{"type":"TextBlock","text":"Adaptive Cards","size":"large"}],"actions":[{"type":"Action.OpenUrl","url":"http://adaptivecards.io","title":"Learn More"}]}',
],
},
};
Expand Down

0 comments on commit 424c4c2

Please sign in to comment.