diff --git a/poetry.lock b/poetry.lock index 1afa5d53909b..3146d38e5dce 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1089,6 +1089,14 @@ python-versions = "*" [package.extras] scripts = ["click (>=6.0)", "twisted (>=16.4.0)"] +[[package]] +name = "iniconfig" +version = "1.1.1" +description = "iniconfig: brain-dead simple config-ini parsing" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "ipaddress" version = "1.0.23" @@ -1976,25 +1984,24 @@ redis = ["redis (>=3.4.1)"] [[package]] name = "pytest" -version = "5.4.3" +version = "6.2.2" description = "pytest: simple powerful testing with Python" category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [package.dependencies] atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} -attrs = ">=17.4.0" +attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -more-itertools = ">=4.0.0" +iniconfig = "*" packaging = "*" -pluggy = ">=0.12,<1.0" -py = ">=1.5.0" -wcwidth = "*" +pluggy = ">=0.12,<1.0.0a1" +py = ">=1.8.2" +toml = "*" [package.extras] -checkqa-mypy = ["mypy (==v0.761)"] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] @@ -3140,7 +3147,7 @@ transformers = ["transformers"] [metadata] lock-version = "1.1" python-versions = ">=3.6,<3.9" -content-hash = "6847b7e392ad91cece166a0c2c22f29511f0b80c87b010d80a27bed03bc957a3" +content-hash = "912e546b4bbf79474e426f3f1ac3c21247add3b823ebcd3b3b3fade6ecad051f" [metadata.files] absl-py = [ @@ -3766,6 +3773,10 @@ incremental = [ {file = "incremental-21.3.0-py2.py3-none-any.whl", hash = "sha256:92014aebc6a20b78a8084cdd5645eeaa7f74b8933f70fa3ada2cfbd1e3b54321"}, {file = "incremental-21.3.0.tar.gz", hash = "sha256:02f5de5aff48f6b9f665d99d48bfc7ec03b6e3943210de7cfc88856d755d6f57"}, ] +iniconfig = [ + {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, + {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, +] ipaddress = [ {file = "ipaddress-1.0.23-py2.py3-none-any.whl", hash = "sha256:6e0f4a39e66cb5bb9a137b00276a2eff74f93b71dcbdad6f10ff7df9d3557fcc"}, {file = "ipaddress-1.0.23.tar.gz", hash = "sha256:b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2"}, @@ -4395,8 +4406,8 @@ pytelegrambotapi = [ {file = "pyTelegramBotAPI-3.7.6.tar.gz", hash = "sha256:859136cbd50e99922e1ea495d4ebe8235b2cb10fe419a5421f28855249db4278"}, ] pytest = [ - {file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1"}, - {file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, + {file = "pytest-6.2.2-py3-none-any.whl", hash = "sha256:b574b57423e818210672e07ca1fa90aaf194a4f63f3ab909a2c67ebb22913839"}, + {file = "pytest-6.2.2.tar.gz", hash = "sha256:9d1edf9e7d0b84d72ea3dbcdfd22b35fb543a5e8f2a60092dd578936bf63d7f9"}, ] pytest-asyncio = [ {file = "pytest-asyncio-0.10.0.tar.gz", hash = "sha256:9fac5100fd716cbecf6ef89233e8590a4ad61d729d1732e0a96b84182df1daaf"}, diff --git a/pyproject.toml b/pyproject.toml index dd6fee031c84..2f2ebb2db21c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -130,7 +130,7 @@ pytest-localserver = "^0.5.0" pytest-sanic = "^1.6.1" pytest-asyncio = "^0.10.0" pytest-xdist = "^1.32.0" -pytest = "^5.3.4" +pytest = "^6.2.2" freezegun = "^1.0.0" responses = "^0.12.1" aioresponses = "^0.6.2" diff --git a/rasa/core/channels/botframework.py b/rasa/core/channels/botframework.py index a592077ebd4e..e417e3fe1428 100644 --- a/rasa/core/channels/botframework.py +++ b/rasa/core/channels/botframework.py @@ -232,8 +232,18 @@ async def webhook(request: Request) -> HTTPResponse: postdata["serviceUrl"], ) + text = "" + if postdata.get("text"): + text = postdata.get("text") + else: + if postdata.get("value"): + raw_value = postdata.get("value") + if "value" in raw_value: + raw_value = raw_value["value"] + text = json.dumps(raw_value) + user_msg = UserMessage( - text=postdata.get("text", ""), + text=text, output_channel=out_channel, sender_id=postdata["from"]["id"], input_channel=self.name(),