Fix Twilio webhook content type (#66561)

This commit is contained in:
Felipe Santos 2022-02-17 17:38:31 -03:00 committed by GitHub
parent d6100abc7c
commit 44befe5f11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
"""Support for Twilio.""" """Support for Twilio."""
from aiohttp import web
from twilio.rest import Client from twilio.rest import Client
from twilio.twiml import TwiML
import voluptuous as vol import voluptuous as vol
from homeassistant.components import webhook from homeassistant.components import webhook
@ -51,7 +51,7 @@ async def handle_webhook(hass, webhook_id, request):
data["webhook_id"] = webhook_id data["webhook_id"] = webhook_id
hass.bus.async_fire(RECEIVED_DATA, dict(data)) hass.bus.async_fire(RECEIVED_DATA, dict(data))
return TwiML().to_xml() return web.Response(text="")
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: