Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

踢人出群后,群成员信息没有及时同步 #146

Closed
Tracked by #19
su-chang opened this issue Feb 9, 2022 · 0 comments
Closed
Tracked by #19

踢人出群后,群成员信息没有及时同步 #146

su-chang opened this issue Feb 9, 2022 · 0 comments
Assignees

Comments

@su-chang
Copy link
Member

su-chang commented Feb 9, 2022

调用移除群成员的接口后,没有等待对应的回调确认信息。默认调用成功后,直接拉取当前群的群成员信息,此时数据还未同步。导致仍可以拉取到被移除的成员。

目前群成员信息均是从接口获取,没有缓存信息。

解决方案

从日志来看,从调用请求到接收到回调接口耗时过长(2秒),不适用等待处理。

针对群成员增加缓存,对于入群和离群事件,拉人进群/踢人出群等及时同步缓存信息。确保数据准确。

日志

10: 23: 54 INFO PuppetWhatsApp roomDel(120363039170086468 @g.us, 8613126768525 @c.us)
10: 23: 55 INFO PuppetWhatsApp roomMemberList(120363039170086468 @g.us)
membersAfterRoomDel length: 5, detail: 8618710175700 @c.us, 8617316842524 @c.us, 8618500946096 @c.us, 8613240330438 @c.us, 8613126768525 @c.us
10: 23: 56 INFO PuppetWhatsApp onRoomLeave({
  "id": {
    "fromMe": false,
    "remote": "120363039170086468@g.us",
    "id": "3A06E53B11367FB361A2",
    "participant": "8613126768525@c.us",
    "_serialized": "false_120363039170086468@g.us_3A06E53B11367FB361A2_8613126768525@c.us"
  },
  "body": "",
  "type": "leave",
  "timestamp": 1644373435,
  "chatId": "8613126768525@c.us",
  "author": "8613126768525@c.us",
  "recipientIds": ["8613126768525@c.us"]
})
10: 23: 56 VERB FlashStore delete(8613126768525 @c.us)
10: 23: 56 VERB Puppet dirtyPayload(Room < 3 > , 8613126768525 @c.us)
10: 23: 56 VERB Puppet dirtyPayloadRoom(8613126768525 @c.us)
@su-chang su-chang mentioned this issue Feb 9, 2022
42 tasks
@su-chang su-chang self-assigned this Feb 9, 2022
@su-chang su-chang closed this as completed Feb 9, 2022
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

No branches or pull requests

1 participant