Skip to content

[BUG] getAdvancedHistoryMessageList interface does not return the latest message (re-enter after exiting the page) #181

@ducky-YFH

Description

@ducky-YFH

OpenIM Server Version

latest

Operating System and CPU Architecture

Windows (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

🐛 Bug 描述(Bug Description)

前端在发送消息后,如果退出当前聊天页面,再重新进入同一个会话,获取到的仍然是旧的消息列表,新发送的消息无法获取到,必须重新登录 IM 账号后才会同步到最新消息。

📦 使用的 SDK 版本(SDK Versions)

  • 小程序使用版本:@openim/[email protected]
  • server使用版本:open-im-server main分支最新代码

📂 相关接口(Related API)

  • getAdvancedHistoryMessageList

🔁 复现步骤(Reproduction Steps)

  1. 登录 IM 账号并进入某个聊天会话。
  2. 发送一条消息。
  3. 退出聊天页面(如返回会话列表)。
  4. 再次进入该聊天页面。
  5. 使用 getAdvancedHistoryMessageList 获取消息列表。
  6. 列表中缺少刚刚发送的消息。
  7. 重新登录 IM 后,才能获取到完整的新消息。

📝 预期行为(Expected Behavior)

重新进入聊天页面时,getAdvancedHistoryMessageList 能正确返回所有历史消息,包括刚刚发送的消息。

📱 环境信息(Environment Info)

  • 运行平台:微信小程序,Windows

Screenshots Link

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions