feat: wire external rules pipeline into ingress and dispatch
- Add DispatchContext field to Task model for rule metadata storage - Add BlocklistEmails config (BLOCKLIST_EMAILS env var) - Wire rules.Pipeline into IMAPWatcher, replacing inline whitelist check - Pass rule metadata through DispatchContext to OpenClaw dispatch - Remove isWhitelisted method (now handled by WhitelistRule) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,7 @@ type Config struct {
|
||||
BridgeCallbackToken string
|
||||
SystemEmail string
|
||||
WhitelistEmails []string
|
||||
BlocklistEmails []string
|
||||
|
||||
// Optional
|
||||
IMAPProxyURL string
|
||||
@@ -74,6 +75,14 @@ func Load() (*Config, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if raw := os.Getenv("BLOCKLIST_EMAILS"); raw != "" {
|
||||
for _, email := range strings.Split(raw, ",") {
|
||||
if trimmed := strings.TrimSpace(email); trimmed != "" {
|
||||
cfg.BlocklistEmails = append(cfg.BlocklistEmails, trimmed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if cfg.ListenAddr == "" {
|
||||
cfg.ListenAddr = ":8080"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user