Commit 9b43f27
Notify participant domains and push recipients_added on add-to (#34)
AddRecipients now records one msg_add_to_notify row per remote
participant domain of the message -- the domains of from and every to
address, excluding domains hosting one of the batch's new recipients
(they learn through normal delivery) and the local domain (this
database is its record) -- so fmsgd delivers the add-to message to
every participant domain per SPEC §10.2, not only the new batch's.
Addresses already added to the message are now rejected up front:
msg_add_to is unique per (msg, addr), so re-adding silently no-opped
and could leave a batch with no recipients, which fmsgd would deliver
as an invalid add-to message. Re-adding an original to recipient stays
allowed (SPEC §10.3 NOTE II).
The websocket hub listens on the new recipients_added channel (fired by
fmsgd's dd.sql when a batch is recorded, whether added locally or
received from a remote host) and pushes the refreshed message to every
connected participant, closing the gap where existing participants got
no realtime signal that recipients were added.
Requires fmsgd's updated dd.sql (msg_add_to_notify table and
recipients_added trigger).
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent bd43ee3 commit 9b43f27
2 files changed
Lines changed: 64 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
131 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
| |||
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
158 | 168 | | |
159 | 169 | | |
160 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
920 | 944 | | |
921 | 945 | | |
922 | 946 | | |
| |||
952 | 976 | | |
953 | 977 | | |
954 | 978 | | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
955 | 1006 | | |
956 | 1007 | | |
957 | 1008 | | |
| |||
0 commit comments