feat(messaging): group & broadcast messages + email-all#60
Merged
Conversation
Members can now message a group or everyone, and the operator can announce to
the whole membership by email.
Inbox channel (any member):
- msg@ recipient spec accepts a comma list (alice,bob,carol) or all/*/everyone
to broadcast: `ssh msg@host alice,bob hi`, `ssh msg@host all hi`.
- Members hub TUI gains multi-select: space toggles, `a` selects all, `m`
messages the selected group (header names the audience); selection clears
after send.
- store.SendMessageMulti delivers one body to many inboxes in a single
transaction (dedupes, skips empties); resolveRecipients validates names,
excludes the sender, and skips banned members on broadcast.
Email channel (operator, explicit):
- new `agentbbs broadcast` subcommand sends an announcement to ALL members via
inbox + email. Preview by default (like notify-creds); --send delivers;
--no-inbox/--no-email pick a channel; --subject/--from/--user refine it.
Email reaches only verified addresses and refuses --send without SMTP.
Tests: SendMessageMulti (dedupe/empty), resolveRecipients (list/unknown/all
tokens, banned + sender exclusion), TUI selection (toggle/select-all/group
compose). Docs: docs/messaging.md. build/vet/gofmt/`go test ./...` green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lets a member message a group or everyone (not just one member), and gives the operator an email-all announcement. Two delivery channels, kept cleanly separate so an ordinary group message never fans out to email:
agentbbs broadcast.Inbox messaging — open to any member
msg@route now accepts a recipient spec:resolveRecipientsvalidates names, excludes the sender, dedupes, reports unknown names, and skips banned accounts on broadcast.Members hub TUI gains multi-select:
spaceamSelected rows show
[x]; the composer header names the audience (e.g.3 members); the selection clears after a successful send.All group/broadcast inbox writes happen in one transaction via the new
store.SendMessageMulti(dedupes recipients, skips empties, returns the count written).Email broadcast —
agentbbs broadcast(operator)The explicit "mail all users" action — an operator command (DB + SMTP env on the host), preview by default like
notify-creds:Inbox reaches every non-banned member; email reaches only verified addresses and refuses
--sendwithout SMTP (use--no-email). Per-channel delivered/failed summary; non-zero exit on email failure.Permissions
Per the requested design: any member can broadcast to all inboxes (selected or all). The email blast is the separate, explicit
agentbbs broadcast(operator-run). If you'd like members to trigger email-all from inside the BBS too, that's a small follow-up — say the word.Tests
store.SendMessageMulti— multi-delivery, dedupe, empty list.resolveRecipients— comma list (lowercase/dedupe/sender-exclude), unknown reporting, all/*/everyone/@alltokens, banned + sender exclusion.go build ./...,go vet ./...,gofmt -l,go test ./...all green (go 1.26.4).Docs
docs/messaging.md— direct/group/broadcast + thebroadcastCLI.🤖 Generated with Claude Code