2

We started seeing a weird issue these days. The adaptive card is not visible in Preview mode in Channel but in chat its visible. I tested a lowest Adaptive card with just one text, and I see the same behavior.

In Chats

enter image description here

enter image description here

In Channel:

enter image description here

Its blank completely. But when you click on Send, the card is posted perfect in Chat.

This is the code:

import { Attachment, CardFactory } from "botbuilder";

export class CustomerResultCard {

    public static getCard(type: string): Attachment {        
        const card =  CardFactory.adaptiveCard(
            {
                "type": "AdaptiveCard",
                "body": [
                    {
                        "type": "ColumnSet",
                        "columns": [
                            {
                                "type": "Column",
                                "width": "stretch",
                                "items": [
                                    {
                                        "type": "ColumnSet",
                                        "columns": [
                                           
                                            {
                                                "type": "Column",
                                                "items": [
                                                    {
                                                        "type": "TextBlock",
                                                        "size": "Large",
                                                        "weight": "Bolder",
                                                        "text": "Entity Type:" +type+ " not supported",
                                                        "height": "stretch"
                                                    }
                                                ],
                                                "height": "stretch",
                                                "style": "default",
                                                "width": 65
                                            }
                                            
                                        ],
                                        "height": "stretch"
                                    }
                                ],
                                "style": "default"
                            }
                        ]
                    }
                ],
                "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
                "version": "1.3"
            }
        );

        return card;
    }
} 
user25879
  • 129
  • 7
  • Note: this is about a Message Extension – Jos Verlinde Nov 25 '21 at 15:06
  • Could you please share repro steps or the sample you are using? – Meghana-MSFT Nov 29 '21 at 16:53
  • I updated the code above. I am using Teams Toolkit to create this search message extension. Once deployed, on Chat it works perfect. I can see the preview in Message box but in Channel , I don't see any preview. When I select a search result , there is a flicker in message box and a space gets added. When I click on send , card is posted in chat of channel. – user25879 Nov 30 '21 at 10:56
  • @user25879 - We were able to repro this issue, We have raised a bug for the same. – Meghana-MSFT Dec 02 '21 at 15:58

1 Answers1

1

The bug is resolved and we can see adaptive card in Channel preview

user25879
  • 129
  • 7