feat: add Telegram Topics (forum mode) support
Some checks failed
Bump version / bump-version (push) Has been cancelled
Merge-forward skill branches / merge-forward (push) Has been cancelled
Update token count / update-tokens (push) Has been cancelled

- buildJid() constructs tg:{chatId}:{threadId} for topic messages
- parseJid() extracts chatId + threadId from JID for outbound routing
- /chatid command shows thread ID in forum topics
- sendMessage and setTyping pass message_thread_id when present
- All message handlers (text, photo, voice, media) use thread-aware JIDs

Allows each forum topic to be registered as an independent Nanoclaw group.
This commit is contained in:
Andy
2026-03-14 12:04:06 +00:00
parent c0902877fa
commit 8e24a31bd4
26 changed files with 5190 additions and 717 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "nanoclaw",
"version": "1.2.12",
"version": "1.1.3",
"description": "Personal Claude assistant. Lightweight, secure, customizable.",
"type": "module",
"main": "dist/index.js",
@@ -8,27 +8,33 @@
"build": "tsc",
"start": "node dist/index.js",
"dev": "tsx src/index.ts",
"auth": "tsx src/whatsapp-auth.ts",
"typecheck": "tsc --noEmit",
"format": "prettier --write \"src/**/*.ts\"",
"format:fix": "prettier --write \"src/**/*.ts\"",
"format:check": "prettier --check \"src/**/*.ts\"",
"prepare": "husky",
"setup": "tsx setup/index.ts",
"auth": "tsx src/whatsapp-auth.ts",
"test": "vitest run",
"test:watch": "vitest"
},
"dependencies": {
"@whiskeysockets/baileys": "^7.0.0-rc.9",
"better-sqlite3": "^11.8.1",
"cron-parser": "^5.5.0",
"grammy": "^1.39.3",
"openai": "^6.25.0",
"pino": "^9.6.0",
"pino-pretty": "^13.0.0",
"qrcode": "^1.5.4",
"qrcode-terminal": "^0.12.0",
"yaml": "^2.8.2",
"zod": "^4.3.6"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.12",
"@types/node": "^22.10.0",
"@types/qrcode-terminal": "^0.12.2",
"@vitest/coverage-v8": "^4.0.18",
"husky": "^9.1.7",
"prettier": "^3.8.1",