diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-10 14:55:20 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-10 14:55:20 +0300 |
| commit | b6be62b537ebfd3a0e2fa25c93d2408ccb418cb7 (patch) | |
| tree | e638c048d5d1ac3c6a546a8ccc6a9f288fd7bb1b /internal/platforms | |
| parent | 896e7c0e1095be1d4aa1eb60448740ab28d4d760 (diff) | |
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
Diffstat (limited to 'internal/platforms')
| -rw-r--r-- | internal/platforms/platform.go | 7 |
1 files changed, 6 insertions, 1 deletions
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) } |
