Commit 8403c94
refactor(notifications): make create() route all completion actions to IU
Greptile flagged that groupedEventTypeFor maps all four Completed* actions to
COMPLETED, but create()'s isRecipientIu only covered CompletedByIU and
CompletedForCompanyByIU. Latent today (Completed/CompletedByCompanyMember only
reach createBulkNotification), but a future create(Completed) call would buffer
the IU recipient as a CU row and mis-deliver.
Extract a single isCompletionAction predicate used by both create() and
groupedEventTypeFor so the two can't drift, and extend the completion test to
cover all four actions.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent f1d6966 commit 8403c94
2 files changed
Lines changed: 37 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
379 | 384 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
389 | 394 | | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
398 | 402 | | |
399 | 403 | | |
400 | 404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 42 | + | |
| 43 | + | |
47 | 44 | | |
48 | 45 | | |
49 | 46 | | |
| |||
616 | 613 | | |
617 | 614 | | |
618 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
619 | 625 | | |
| 626 | + | |
620 | 627 | | |
621 | 628 | | |
622 | 629 | | |
| |||
627 | 634 | | |
628 | 635 | | |
629 | 636 | | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | 637 | | |
636 | 638 | | |
637 | 639 | | |
| |||
0 commit comments