-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MS Teams does not return Activity object when sending attachment list #6366
Comments
Hi @nonatocosta ! I'm working on a repo of this to see what's going, and possibly reach out the Teams or Services team once I've narrowed it down. In the mean time, I was curious to see if you'd tried adaptive cards instead of hero cards. Their functionality should allow for vertically stacked buttons in both channels like what you're describing: |
Hi @jwiley84 , thanks for the answer and the attention with my issue. I had already tried adaptive cards, but it does not seem to work well with Slack, because, instead of the card with the buttons, it renders an image "emulating" the card. Apparently adaptive cards only work with MS Teams. But again, thank you very much |
Apologies for the delay. It would seem that Teams is splitting the attachment into 2 activities, and as the api only supports returning one activity ID, it's returning none. Could you split the attachment up into single cards, send them individually, and track the activity ID that way? |
Hi, no worries thank you for your attention. I can do that, the only issue is that if I have 5 options, for example, I'll need to deal with 6 different activities ID's (1 for the question + 5 options) in order to hide the options after the user select one. May this cause some kind of weird behavior? As you can see, if I change the style to 'carousel' instead of 'list', this problem does no happen. thank you very much |
I'll reach out to the Teams team regarding the .list issue. This is something happening on their end. |
ok, thank you |
@clearab Is this something that should be transferred to the Teams team? |
This is a known limitation in Teams, and message splitting is the culprit. Carousel is creating a single message in Teams, with a single ID. List is creating multiple messages, each with their own ID (that unfortunately aren't all given back to the bot developer). The only real option unfortunately is to send multiple separate cards, or go send a single card with multiple buttons and be ok with the horizontal alignment. If you'd like to reach out to the Teams group directly to give them additional feedback on this, you can do so through one of the options outlined here: https://aka.ms/teamsdevfeedback. I'll also share this Issue with them. |
Version
4
Describe the bug
Hey guys
I have a use case where I need to send to the user 2 messages: the first one is a heroCard with a survey question statement and the second one is a list of heroCards with the options.
The code to achieve that is this:
You may ask: why not just use the "buttons" property of the first heroCard? I can't, because one of the requests is to show the options vertically (stacked).
It displays the options correctly, as I show in the print bellow
![image](https://user-images.githubusercontent.com/68787711/129922917-c5de89ff-e555-4196-935a-e49e20515ab6.png)
The problem is that I need to capture the ActivityId of the second message (with the options) so then I can hide it (using
updateActivity
) when the user select one option.But, for some weird reason it does not work properly in MS Teams, however it works very well in Slack, as you can see in the print bellow!
![image](https://user-images.githubusercontent.com/68787711/129926063-50c8ed46-5384-43ee-8f49-fd57fccbb1db.png)
PS: I don't know if it can helps, but if I change the "attachmentLayout" from "list" to "carousel", the ActitiyId is generated correctly in MS Teams, as shown below:
![image](https://user-images.githubusercontent.com/68787711/129926314-b6e5d05a-aad0-417f-9f49-dc0efba0b7ba.png)
Please, can you guys help me?
Thanks in advance.
Expected behavior
It should show the activity object properly
The text was updated successfully, but these errors were encountered: