Forum Discussion
catmanjan2010
Oct 17, 2022Copper Contributor
Teams command bar integration bot shows See More and See Less button for no reason
Teams command bar integration bot shows "See More" and "See Less" button for no reason Clicking the buttons has no effect How do we remove these buttons? Seems to appear no matter what length...
Nivedipa-MSFT
Microsoft
Oct 18, 2022catmanjan2010 - Could you please sharevthe repro steps to repro this issue?
catmanjan2010
Oct 19, 2022Copper Contributor
Nivedipa-MSFT develop a command bar integration which returns the following card
var card = new ThumbnailCard
{
Title = "title",
Subtitle = "subtitle",
Text = "text",
Images = new List<CardImage> { new CardImage { Url = $"someimagehere" } }
};
return new MessagingExtensionResponse
{
ComposeExtension = new MessagingExtensionResult
{
Type = "result",
AttachmentLayout = "list",
Attachments = new[]
{
new MessagingExtensionAttachment
{
ContentType = ThumbnailCard.ContentType,
Content = card,
Preview = card.ToAttachment()
}
}
}
};
no matter how long the strings you provide are the see more/see less buttons appear
- Nivedipa-MSFTOct 19, 2022
Microsoft
catmanjan2010 - Could you please elaborate on command bar integration? Share any document reference?
Are you trying to implement messaging extension and in preview you are getting this see less and see more options?
Could you please share how you are doing command bar integration?
It helps us to repro the issue.- catmanjan2010Oct 23, 2022Copper Contributor
Nivedipa-MSFT this is the guide I followed https://learn.microsoft.com/en-us/microsoftteams/platform/messaging-extensions/how-to/search-commands/respond-to-search?tabs=dotnet
Here is the source code sample https://github.com/microsoft/BotBuilder-Samples/blob/main/samples/csharp_dotnetcore/50.teams-messaging-extensions-search/Bots/TeamsMessagingExtensionsSearchBot.cs
- Nivedipa-MSFTOct 31, 2022
Microsoft
catmanjan2010 - We have tested this, but we are not getting any see more and see less button.
And used below code:var card = new ThumbnailCard { Title = $"{packageId}, {version}", Subtitle = description, Buttons = new List<CardAction> { new CardAction { Type = ActionTypes.OpenUrl, Title = "Nuget Package", Value = $"https://www.nuget.org/packages/{packageId}" }, new CardAction { Type = ActionTypes.OpenUrl, Title = "Project", Value = projectUrl }, }, }; if (!string.IsNullOrEmpty(iconUrl)) { card.Images = new List<CardImage>() { new CardImage(iconUrl, "Icon") }; } var attachment = new MessagingExtensionAttachment { ContentType = ThumbnailCard.ContentType, Content = card, }; return Task.FromResult(new MessagingExtensionResponse { ComposeExtension = new MessagingExtensionResult { Type = "result", AttachmentLayout = "list", Attachments = new List<MessagingExtensionAttachment> { attachment } } });
Could you please update Teams version and check again.