Per-channel retention config, daily scheduled cleanup, slash command and REST API support, plus a single Channel cleanup menu that opens a plugin modal for configure, run-now, and disable actions. Co-authored-by: Cursor <cursoragent@cursor.com>
16 lines
338 B
Go
16 lines
338 B
Go
package autocleanup
|
|
|
|
const (
|
|
kvKeyPrefix = "auto_cleanup_"
|
|
autoCleanupJobKey = "AutoCleanupJob"
|
|
)
|
|
|
|
// Config holds per-channel automatic cleanup settings.
|
|
type Config struct {
|
|
ChannelID string `json:"channel_id"`
|
|
OffsetDays int `json:"offset_days"`
|
|
}
|
|
|
|
func kvKey(channelID string) string {
|
|
return kvKeyPrefix + channelID
|
|
}
|