twindex-openclaw-plugin 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  "id": "twindex",
3
3
  "name": "Twindex",
4
4
  "description": "Music intelligence for AI agents. Get notified about tours, merch drops, releases, and presales for your favorite artists.",
5
- "version": "0.5.5",
5
+ "version": "0.5.6",
6
6
  "skills": ["./skills"],
7
7
  "configSchema": {
8
8
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twindex-openclaw-plugin",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "Music intelligence for AI agents. Tours, merch drops, releases, presales.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -41,10 +41,18 @@ export function createNotificationService(api: any) {
41
41
  }
42
42
 
43
43
  function getChatTarget(): string | undefined {
44
- return api.config?.plugins?.entries?.twindex?.config?.chatTarget;
44
+ const raw = api.config?.plugins?.entries?.twindex?.config?.chatTarget;
45
+ if (!raw) return undefined;
46
+ // Strip channel prefix if agent included it (e.g. "telegram:123" → "123")
47
+ const colonIdx = raw.indexOf(":");
48
+ return colonIdx >= 0 ? raw.slice(colonIdx + 1) : raw;
45
49
  }
46
50
 
47
51
  function getChatChannel(): string {
52
+ const raw = api.config?.plugins?.entries?.twindex?.config?.chatTarget ?? "";
53
+ // Infer channel from prefix if present (e.g. "telegram:123" → "telegram")
54
+ const colonIdx = raw.indexOf(":");
55
+ if (colonIdx > 0) return raw.slice(0, colonIdx);
48
56
  return api.config?.plugins?.entries?.twindex?.config?.chatChannel ?? "telegram";
49
57
  }
50
58