package entity import ( "fmt" "regexp" ) const ( // BotCount is how many seeded robot accounts the seed command ensures. BotCount = 100 // BotEmailDomain is the reserved mailbox domain for seed bots (not OTP-free). BotEmailDomain = "spark.bot" ) var botEmailRe = regexp.MustCompile(`^bot(0[0-9]{2}|100)@spark\.bot$`) // BotEmail returns bot001@spark.bot … bot100@spark.bot. func BotEmail(index int) string { if index < 1 || index > BotCount { return "" } return fmt.Sprintf("bot%03d@%s", index, BotEmailDomain) } // BotSparkID returns sparkbot001 … sparkbot100 (ValidSparkID length). func BotSparkID(index int) string { if index < 1 || index > BotCount { return "" } return fmt.Sprintf("sparkbot%03d", index) } // IsBotEmail reports whether email is a seeded robot mailbox. func IsBotEmail(email string) bool { return botEmailRe.MatchString(NormalizeEmail(email)) } // WelcomeBotIndex is the robot friended to every formal/test user for greetings. const WelcomeBotIndex = 1 // SampleGroupBotCount is how many robots join the English sample group (owner + peers). const SampleGroupBotCount = 8 // SampleGroupName is the seeded multi-bot English sample chat. const SampleGroupName = "Spark Samples"