Getting input from MS Teams adaptiveCards

I did play around to figure out a way to get the input fields from adaptive cards. Just a small change, but it should make it to the botframework.py OOB

from line 215 botframework.py

    @botframework_webhook.route("/webhook", methods=["POST"])
    async def webhook(request: Request) -> HTTPResponse:
        postdata = request.json
        metadata = self.get_metadata(request)
        if metadata is None:
            metadata = {'name' : None}
            metadata['name']=postdata['from']['name']
            
        if "value" in postdata:
            metadata.update(postdata["value"])

        metadata_with_attachments = self.add_attachments_to_metadata(
            postdata, metadata
        )

i just added the condition to add the values into metadata … and in actions you can easily use

hey @dx111ge … it’s July 17 2023… i still do not see this code in botframework.py. can you please urge the rasa development team to add it? Even if not for the input from adaptive cards I could see many devs asking for the user info. Username is a basic thing and i feel it should be added to metadata for anybody to access it at latest_message.

Thank you for the solution.