Skip to content

fix(san): skip private chat sessions during group message history fetch to avoid integer parsing warnings#121

Open
Rat0323 wants to merge 1 commit into
Renyus:masterfrom
Rat0323:fix-san-private-chat-warning
Open

fix(san): skip private chat sessions during group message history fetch to avoid integer parsing warnings#121
Rat0323 wants to merge 1 commit into
Renyus:masterfrom
Rat0323:fix-san-private-chat-warning

Conversation

@Rat0323

@Rat0323 Rat0323 commented Jun 3, 2026

Copy link
Copy Markdown

This PR fixes a warning log spam [SAN] 获取群消息失败: invalid literal for int() with base 10 when the user configures a private chat (e.g. private_123456) in the target_scopes whitelist.

Since the SAN status analysis is designed to analyze group chats (using NapCat's group history message API which requires group ID as an integer), it fails when it tries to cast a private chat string token to int.

This PR filters out private chats starting with "private_" in both _get_listened_groups and adds a double-guard check inside _fetch_group_messages so it cleanly ignores private chats for SAN analysis while keeping them available for the rest of the self-evolution memory modules.

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