feat(mail): extend message bead for queues/channels
Add queue/channel routing fields to message beads: - queue: string (queue name, mutually exclusive with to/channel) - channel: string (channel name, mutually exclusive with to/queue) - claimed_by: string (who claimed queue message) - claimed_at: timestamp (when claimed) Messages can now be direct (To), queued (Queue), or broadcast (Channel). Added constructors NewQueueMessage/NewChannelMessage, type helpers IsQueueMessage/IsChannelMessage/IsDirectMessage/IsClaimed, and Validate() for mutual exclusivity checks. Also fixes build error in mail_queue.go (QueueConfig struct nil comparison). Closes gt-xfqh1e.4 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
a244c3d498
commit
8eafcc8a16
@@ -35,7 +35,7 @@ func runMailClaim(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
queueCfg, ok := cfg.Queues[queueName]
|
||||
if !ok || queueCfg == nil {
|
||||
if !ok {
|
||||
return fmt.Errorf("unknown queue: %s", queueName)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user