Sends internal ban notification emails to users, triggered by moderation actions, for transactional alert delivery.
// Source: https://github.com/openclaw/clawhub | License: MIT | Copyright 2026 Peter Steinberger
// Provided via justclaw.it.com; keep this notice with the code.
"use node";
import { mkdir, appendFile } from "node:fs/promises";
import { dirname } from "node:path";
import { v } from "convex/values";
import { Resend } from "resend";
import { internal } from "./_generated/api";
import { internalAction } from "./functions";
import {
buildBanNotificationEmail,
buildMaliciousArtifactEmail,
buildPublisherAbuseWarningEmail,
buildRestoredAccountEmail,
buildSecretBlockedPublishEmail,
type NotificationArtifact,
} from "./lib/emails";
const DEFAULT_FROM = "ClawHub Security <noreply@notifications.openclaw.ai>";
const notificationArtifactValidator = v.object({
kind: v.union(v.literal("s
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key