feat(webhook): add {__raw__} template token and thread_id passthrough for forum topics

- {__raw__} in webhook prompt templates dumps the full JSON payload (truncated at 4000 chars)
- _deliver_cross_platform now passes thread_id/message_thread_id from deliver_extra as metadata, enabling Telegram forum topic delivery
- Tests for both features
This commit is contained in:
Nick 2026-04-06 08:26:39 +12:00 committed by Teknium
parent 631d159864
commit 4f03b9a419
3 changed files with 119 additions and 2 deletions

View file

@ -257,7 +257,7 @@ class TestCrossPlatformDelivery:
assert result.success is True
mock_tg_adapter.send.assert_awaited_once_with(
"12345", "I've acknowledged the alert."
"12345", "I've acknowledged the alert.", metadata=None
)
# Delivery info should be cleaned up
assert chat_id not in adapter._delivery_info