ChenyqThu
|
48875ce875
|
feat(biz-articles): add --unread filter (one latest article per account)
只列「有未读的公众号」的最近 1 篇文章 — 与 'wx unread --filter official'
行为一致,便于扫描"哪些公众号还有未读,标题是啥"。
- ipc.rs: BizArticles 加 unread: bool 字段(serde default = false 向后兼容)
- cli/mod.rs: --unread flag
- cli/biz_articles.rs: 透传 unread
- daemon/server.rs: dispatch 加 unread 参数
- daemon/query.rs: q_biz_articles
- 开启 --unread 时先查 session.db 拿 unread_count>0 且
chat_type==official_account 的 username 集合
- 与 --account 取交集(两者都给时进一步缩小范围)
- 空交集提前 return,避免无意义全表扫
- 解析后按 pub_time DESC 排,每个 account_username 只保留首条
- 最后再 truncate(limit)
|
2026-05-14 15:52:40 +08:00 |