From b6be62b537ebfd3a0e2fa25c93d2408ccb418cb7 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 10 Apr 2026 14:55:20 +0300 Subject: Add snonux platform (sno/sn aliases), noop-like posting and share defaults Snonux posts via noop.Post and is omitted from default share targets unless share:snonux, share:sno, or share:sn is set. Normalize share tokens through platform aliases; case-fold ExpandAliases segments. Skip low-queue nag for snonux like noop. Made-with: Cursor --- internal/platforms/platform.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'internal/platforms') diff --git a/internal/platforms/platform.go b/internal/platforms/platform.go index 99169f1..95cade2 100644 --- a/internal/platforms/platform.go +++ b/internal/platforms/platform.go @@ -22,6 +22,9 @@ var aliases = map[string]string{ "ma": "mastodon", "no": "noop", "noop": "noop", + "snonux": "snonux", + "sno": "snonux", + "sn": "snonux", "xcom": "xcom", "x": "xcom", "twitter": "xcom", @@ -50,6 +53,8 @@ func (p Platform) Post(ctx context.Context, args config.Args, sizeLimit int, en err = linkedin.Post(ctx, args, sizeLimit, en) case "noop": err = noop.Post(ctx, args, sizeLimit, en) + case "snonux": + err = noop.Post(ctx, args, sizeLimit, en) default: err = fmt.Errorf("Platform '%s' (not yet) implemented", p) } @@ -75,7 +80,7 @@ func ExpandAliases(shareTag string) (string, error) { dedup := make(map[string]struct{}, len(aliases)) for _, alias := range parts[1:] { - platformStr, ok := aliases[alias] + platformStr, ok := aliases[strings.ToLower(alias)] if !ok { return "", fmt.Errorf("invalid platform alias '%s' in '%s'", alias, shareTag) } -- cgit v1.2.3