提交 4ab19a29 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

better dirty room payload when add new members (#1380)

上级 16121db6
......@@ -1070,11 +1070,9 @@ export class PuppetPadchat extends Puppet {
await this.padchatManager.WXInviteChatRoomMember(roomId, contactId)
}
await this.roomPayloadDirty(roomId)
await this.roomMemberPayloadDirty(roomId)
// Reload room information here
await new Promise(r => setTimeout(r, 1000))
await this.roomPayload(roomId)
await this.roomMemberPayloadDirty(roomId)
await this.roomMemberPayload(roomId, contactId)
}
......@@ -1097,12 +1095,12 @@ export class PuppetPadchat extends Puppet {
}
await this.padchatManager.WXSetChatroomName(roomId, topic)
await this.roomPayloadDirty(roomId)
/**
* Give server some time to refresh the API payload
* when we have to make sure the data is the latest.
*/
await new Promise(r => setTimeout(r, 1000))
await this.roomPayloadDirty(roomId)
await this.roomPayload(roomId)
return
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册