Skip to content

fix(broadcast): match the recipient count to who is actually sent - #1598

Merged
viethung0o0 merged 1 commit into
mainfrom
fix/broadcast-contacts-without-dm
Oct 31, 2026
Merged

viethung0o0 merged 1 commit into
mainfrom
fix/broadcast-contacts-without-dm

Conversation

@viethung0o0

@viethung0o0 viethung0o0 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • By default a broadcast counts and sends only to contacts that already have a direct chat, so the form count matches what is sent
  • A "Last interaction" condition also reaches contacts without a direct chat; one is opened for them when the broadcast is prepared
  • Count only the recipients actually stored, so contacts on several inboxes are not counted twice
  • Clear recipients left by a preparation that was moved back to draft in the background, and refuse to re-schedule until they are gone
  • Stop a stale preparation from writing more recipients once the broadcast is moved back to draft
  • Cap each recipient purge chunk at the time left, so a blocked delete cannot hold a worker slot
  • Add the "has a value" operator to the last interaction filter
  • Document who a broadcast reaches and how to target by chat history

Validation

  • Type checks for database, worker-config, business, worker and builder
  • Unit tests for database, business, worker and builder
  • Database tests for the purge, direct chat creation and filtered audience walk

@github-actions github-actions Bot added the bug Something isn't working as expected label Oct 30, 2026
@viethung0o0
viethung0o0 force-pushed the fix/broadcast-contacts-without-dm branch 6 times, most recently from 502d4aa to 1e8d06d Compare October 31, 2026 03:18
@viethung0o0
viethung0o0 force-pushed the fix/broadcast-contacts-without-dm branch from 1e8d06d to 8de5125 Compare October 31, 2026 03:37
@viethung0o0
viethung0o0 marked this pull request as ready for review October 31, 2026 07:13
@viethung0o0 viethung0o0 changed the title fix(broadcast): reach contacts that have no direct chat yet fix(broadcast): match the recipient count to who is actually sent Oct 31, 2026
@viethung0o0
viethung0o0 merged commit 3953930 into main Oct 31, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants