feat: 支持以用户身份获取消息对当前用户的已读/未读状态
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.3k
- Forks
- 1.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 105
Description
背景
目前在使用 lark-cli 处理 IM 消息时,可以查询消息内容、消息列表等信息,但缺少一个能力:以当前用户身份判断某条消息对当前用户来说是否已经已读。
这个能力对自动化个人消息处理、未读消息提醒、消息同步、Agent/CLI 助手类场景比较重要。
期望能力
希望 lark-cli 能支持获取某条消息在当前用户视角下的已读/未读状态,例如:
- 当前用户是否已读指定
message_id的消息 - 或在查询消息列表/聊天记录时,返回每条消息相对当前用户的
read/unread状态
理想情况下,该能力应支持用户身份调用,而不是仅以机器人身份查询全局消息信息。
可能的 CLI 形态
示例,仅供参考:
lark-cli im message read-status --message-id <message_id> --as user
或在现有消息查询命令中增加字段/参数:
lark-cli im message get --message-id <message_id> --as user --with-read-status
lark-cli im message list --chat-id <chat_id> --as user --with-read-status
返回示例:
{
"message_id": "om_xxx",
"read_status": "unread",
"is_read_by_current_user": false
}
使用场景
- CLI/Agent 定期扫描当前用户的未读消息
- 对聊天记录做本地同步时保留用户视角下的已读状态
- 自动化提醒只处理当前用户尚未读过的消息
- 构建个人工作台时区分已读与未读消息
补充说明
如果飞书开放平台目前已有对应 OpenAPI,希望 lark-cli 能封装该能力;如果当前 OpenAPI 还不支持,也希望能在文档中明确该限制,方便使用者判断是否有可行替代方案。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing im message get and im message list entry points, then check whether the Lark OpenAPI supports user-scoped message read status. Done means exposing a supported read/unread result for the current user, or documenting the platform limitation and viable alternatives.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100