Skip to content

Task/add reddit utils#645

Closed
lunatech wants to merge 16 commits intoqwibitai:mainfrom
lunatech:task/add_reddit_utils
Closed

Task/add reddit utils#645
lunatech wants to merge 16 commits intoqwibitai:mainfrom
lunatech:task/add_reddit_utils

Conversation

@lunatech
Copy link
Copy Markdown

@lunatech lunatech commented Mar 2, 2026

Type of Change

  • Skill - adds a new skill in .claude/skills/
  • Fix - bug fix or security fix to source code
  • Simplification - reduces or simplifies source code

Description

For Skills

  • I have not made any changes to source code
  • My skill contains instructions for Claude to follow (not pre-built code)
  • I tested this skill on a fresh clone

lunatech and others added 16 commits February 25, 2026 12:03
…command and instead call pkill via spawnSync with argument arrays (['-f', matchPattern]), removing path interpolation in shell strings.

Added a dedicated regex-escaping helper plus buildOrphanedProcessMatchPattern(projectRoot) so pkill -f receives a safely escaped pattern derived from the project path (including special characters), while preserving the quiet fallback when pkill execution is unavailable (result.error).
Added a focused test for the new pattern-construction helper using a path with spaces, quotes, and regex metacharacters to verify escaping behavior and guard against injection-prone command-string artifacts.
Testing
✅ npm test -- setup/service.test.ts
✅ npm run typecheck
Refactored killOrphanedProcesses to stop using an interpolated shell …
adding a fine grained secret to repo
chore: sync fork with upstream main
- Install python3, python3-pip, python3-venv
- Pre-install praw for Reddit API access
- Enables Python-based CLI tools in agent environment

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Download photos and documents from Telegram messages
- Save files to group media folder with proper MIME types
- Detect file types using magic bytes (PDF, PNG, JPEG, GIF, WEBP)
- Compatible with existing WhatsApp attachment handling
- Media available to agents for reading and analysis

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add grammy dependency for Telegram bot support
- Add TELEGRAM_BOT_TOKEN and TELEGRAM_ONLY config variables
- Initialize TelegramChannel in main orchestrator alongside WhatsApp
- Update main group documentation to reference Telegram instead of WhatsApp
- Add Telegram JID pattern tests (tg: prefix, group detection)
- Add comprehensive Telegram channel test suite

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Import GROUPS_DIR to support group-specific media directories
- Refactor MIME type sniffing for better readability (PDF, PNG, JPEG detection)
- Improve media download and file writing flow with proper error handling
- Store media files in group-specific paths for better organization
- Format function signatures for clarity

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Improve line wrapping in Telegram channel media handling
- Simplify database migration ALTER TABLE statements
- Format group-queue message payload construction for readability
- Improve test file formatting with better line breaks

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Improve getClaudeAttachments function signature formatting
- Simplify MIME type detection logic with better line breaks
- Update package-lock.json for grammy dependency

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c38857c7cd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/channels/telegram.ts
chat_jid: chatJid,
sender: ctx.from?.id?.toString() || '',
sender_name: senderName,
content: mediaPath ? caption : `${placeholder}${caption}`,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep Telegram caption triggers at message start

In storeNonText, the stored text is prefixed with placeholders when no media file is attached (content: mediaPath ? caption : ${placeholder}${caption}). For handlers like message:video(which callstoreNonText(..., false)), a caption such as @andy summarize thisbecomes[Video] @andy summarize this, so it no longer matches the anchored trigger (^@...`) used by the message loop. In trigger-required groups, media captions that mention the assistant can be silently ignored.

Useful? React with 👍 / 👎.

Comment thread src/index.ts
Comment on lines +489 to +493
if (!TELEGRAM_ONLY) {
whatsapp = new WhatsAppChannel(channelOpts);
channels.push(whatsapp);
await whatsapp.connect();
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fail fast when TELEGRAM_ONLY leaves no channel

Channel initialization now enables Telegram only when a token is present and enables WhatsApp only when TELEGRAM_ONLY is false, but there is no validation that at least one channel was created. If TELEGRAM_ONLY=true and TELEGRAM_BOT_TOKEN is unset/empty, the service starts with an empty channels array and cannot receive or send messages, which is a silent unusable configuration.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant