From 8c4a9baf4d0e0f5dc6a0d407f74997f7baebf866 Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Tue, 3 Mar 2026 15:34:18 -0500 Subject: [PATCH] test(webhook): multi-to outbound no receipts --- test/property/test_webhook_handler.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/property/test_webhook_handler.rb b/test/property/test_webhook_handler.rb index 8f42c0ee093a86607aaae5f6a5db8b07ffb5a056..44f91e1eb85c2c1cec51c97212f9487622b82296 100644 --- a/test/property/test_webhook_handler.rb +++ b/test/property/test_webhook_handler.rb @@ -48,4 +48,28 @@ class WebhookPropertyTest < Minitest::Test } end em :test_single_recipient_message_delivered_sends_one_receipt + + def test_multi_recipient_outbound_sends_no_receipts + property_of { + Webhook + .new(REDIS) + .type { choose(*Webhook::OUTBOUND_TYPES) } + .message { |registered, jid, dir, top_level_to| + Message + .new(REDIS) + .to { + array(integer(2)) { nanpa_phone } + + [top_level_to] + + array(range(1, 3)) { nanpa_phone } + } + .generate(registered, jid, dir) + } + .generate + }.check { |metadata, example| + result = invoke_webhook(example) + assert_equal 200, result[0] + assert_equal 0, written.length, "Should not group chat receipts" + } + end + em :test_multi_recipient_outbound_sends_no_receipts end