Skip to content

Commit 74faaad

Browse files
committed
fix: 🐛 do not block ready signal
1 parent cd475d6 commit 74faaad

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"@juzi/wechaty-puppet": "^1.0.15"
7070
},
7171
"dependencies": {
72-
"@juzi/whatsapp-web.js": "1.30.11",
72+
"@juzi/whatsapp-web.js": "1.30.12",
7373
"ee-ts": "^1.0.2",
7474
"flash-store": "^1.0.6",
7575
"fs-extra": "^10.0.1",

src/whatsapp/event-handler/login-event-handler.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,19 @@ export default class LoginEventHandler extends WhatsAppBase { // FIXME: I have n
134134
}
135135
await cacheManager.setContactOrRoomRawPayload(contactOrRoomId, contactWithAvatar)
136136
} else if (isRoomId(contactOrRoomId)) {
137-
const memberList = await this.manager.syncRoomMemberList(contactOrRoomId)
137+
let memberList: string[] = []
138+
try {
139+
memberList = await this.manager.syncRoomMemberList(contactOrRoomId)
140+
} catch (error) {
141+
log.warn(PRE, `syncRoomMemberList(${contactOrRoomId}) failed, ${JSON.stringify(error)}`)
142+
}
138143
if (memberList.length > 0) {
139144
roomCount++
140145
await cacheManager.setContactOrRoomRawPayload(contactOrRoomId, contactWithAvatar)
141146
} else {
142147
await cacheManager.deleteContactOrRoom(contactOrRoomId)
143148
await cacheManager.deleteRoomMemberIdList(contactOrRoomId)
149+
return
144150
}
145151
} else {
146152
log.warn(PRE, `Unknown contact type: ${JSON.stringify(contactOrRoom)}`)

0 commit comments

Comments
 (0)