Skip to content

fix(parser): 正确识别 Discord 一对一私聊 - #504

Merged
hellodigua merged 2 commits into
mainfrom
fix/discord-private-chat
Oct 27, 2026
Merged

hellodigua merged 2 commits into
mainfrom
fix/discord-private-chat

Conversation

@hellodigua

@hellodigua hellodigua commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

修复内容

  • 根据 DiscordChatExporter 的 channel.type 将 DirectTextChat 识别为私聊。
  • 多人私信 DirectGroupTextChat、普通频道和缺失类型保持群聊行为,不依据 Direct Messages 名称判断。
  • 私聊使用频道名称,不再添加 Direct Messages 前缀,也不再使用群头像。
  • 保留 channel ID 到现有 groupId 字段,复用稳定会话匹配,避免短私聊重复导入或无重叠追加时创建重复会话。
  • 补充实际解析入口测试及真实 SQLite 集成测试,验证重复导入去重和无重叠追加。

验证

  • 两项回归分别在修复前复现错误分类和重复会话问题。
  • 解析与自动导入相关 31 项测试通过。
  • Node 类型检查、ESLint、Prettier、git diff --check 通过。

兼容性

不修改已导入数据,不新增数据库迁移。已误识别为群聊的记录需要重新导入才能应用新规则。

Closes #503

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T10:26:29.282109Z d1e3cbd Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: 2322f7ea48

ℹ️ 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".

Retain the channel ID for stable matching of short and non-overlapping private exports. Add a real SQLite regression test covering repeated import deduplication and incremental append.

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

Copy link
Copy Markdown

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: d1e3cbde47

ℹ️ 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".

@hellodigua

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: d1e3cbde47

ℹ️ 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".

@hellodigua
hellodigua merged commit f19beea into main Oct 27, 2026
1 check passed
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.

Discord私聊無法識別成私聊

1 participant