mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Fix sending polls to Telegram threads (#137553)
Fix sending poll to Telegram thread
This commit is contained in:
parent
3297b27dce
commit
603a1ed69c
@ -175,6 +175,7 @@ BASE_SERVICE_SCHEMA = vol.Schema(
|
||||
vol.Optional(ATTR_KEYBOARD_INLINE): cv.ensure_list,
|
||||
vol.Optional(ATTR_TIMEOUT): cv.positive_int,
|
||||
vol.Optional(ATTR_MESSAGE_TAG): cv.string,
|
||||
vol.Optional(ATTR_MESSAGE_THREAD_ID): vol.Coerce(int),
|
||||
},
|
||||
extra=vol.ALLOW_EXTRA,
|
||||
)
|
||||
@ -216,6 +217,7 @@ SERVICE_SCHEMA_SEND_POLL = vol.Schema(
|
||||
vol.Optional(ATTR_ALLOWS_MULTIPLE_ANSWERS, default=False): cv.boolean,
|
||||
vol.Optional(ATTR_DISABLE_NOTIF): cv.boolean,
|
||||
vol.Optional(ATTR_TIMEOUT): cv.positive_int,
|
||||
vol.Optional(ATTR_MESSAGE_THREAD_ID): vol.Coerce(int),
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -184,7 +184,7 @@ async def test_send_message_thread(hass: HomeAssistant, webhook_platform) -> Non
|
||||
|
||||
assert len(events) == 1
|
||||
assert events[0].context == context
|
||||
assert events[0].data[ATTR_MESSAGE_THREAD_ID] == "123"
|
||||
assert events[0].data[ATTR_MESSAGE_THREAD_ID] == 123
|
||||
|
||||
|
||||
async def test_webhook_endpoint_generates_telegram_text_event(
|
||||
|
Loading…
x
Reference in New Issue
Block a user