mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-09 01:17:06 +08:00
fix the logic of get bothTalked
This commit is contained in:
@@ -267,8 +267,8 @@ const mainLoop = async () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
await sleepWithRandomDelay(1500)
|
await sleepWithRandomDelay(1500)
|
||||||
const bossInfo = await pageMapByName.boss?.evaluate(
|
const conversationInfo = await pageMapByName.boss?.evaluate(
|
||||||
'document.querySelector(".chat-conversation .chat-record")?.__vue__?.boss'
|
`document.querySelector('.chat-conversation .chat-im.chat-editor')?.__vue__?.conversation$`
|
||||||
)
|
)
|
||||||
|
|
||||||
const historyMessageList =
|
const historyMessageList =
|
||||||
@@ -282,7 +282,9 @@ const mainLoop = async () => {
|
|||||||
if (
|
if (
|
||||||
historyMessageList[historyMessageList.length - 1].isSelf &&
|
historyMessageList[historyMessageList.length - 1].isSelf &&
|
||||||
historyMessageList[historyMessageList.length - 1].status === MsgStatus.HAS_READ &&
|
historyMessageList[historyMessageList.length - 1].status === MsgStatus.HAS_READ &&
|
||||||
((bossInfo && !bossInfo.bothTalked) ||
|
((conversationInfo &&
|
||||||
|
Object.hasOwn(conversationInfo, 'bothTalked') &&
|
||||||
|
!conversationInfo.bothTalked) ||
|
||||||
!historyMessageList.filter(
|
!historyMessageList.filter(
|
||||||
(it) => !it.isSelf // not sent by me
|
(it) => !it.isSelf // not sent by me
|
||||||
).length) &&
|
).length) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user