-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
should refresh room data when there is a room event #1328
Labels
Comments
Wechaty Version:2725f1a (commit number over BugCannot refresh room member and room topic when there is a room event. Reproduce Step
/**
* find room name start with "ding"
*/
try {
const dingRoom = await this.Room.find({ topic: /^ding/i })
if (dingRoom) {
/**
* room found
*/
log.info('Bot', 'onMessage: got dingRoom: %s', dingRoom.topic())
if (dingRoom.has(from)) {
/**
* speaker is already in room
*/
const topic = await dingRoom.topic()
log.info('Bot', 'onMessage: sender has already in dingRoom')
dingRoom.say('no need to ding again, because you are already in ding room', from)
from.say(`I found you have joined in room ${topic}!`)
// sendMessage({
// content: 'no need to ding again, because you are already in ding room'
// , to: sender
// })
} else {
/**
* put speaker into room
*/
log.info('Bot', 'onMessage: add sender(%s) to dingRoom(%s)', from.name(), dingRoom.topic())
from.say('ok, I will put you in ding room!')
putInRoom(from, dingRoom)
}
Expect:join the ding room Actual:
Log19:00:59 INFO Bot onMessage: got dingRoom: [object Promise]
19:00:59 VERB PuppetPadchat roomMemberList(6350854677@chatroom)
19:00:59 VERB PuppetPadchatManager getRoomMemberIdList(6350854677)
19:00:59 VERB PuppetPadchatManager getRoomMemberIdList(6350854677) length=2
19:00:59 VERB Room topic()
19:00:59 SILL PuppetPadchat roomMemberList()=2
19:00:59 INFO Bot onMessage: sender has already in dingRoom
19:00:59 VERB Room say(no need to ding again, because you are already in ding room, 李佳芮)
19:00:59 VERB PuppetPadchat messageSend({"roomId":"6350854677@chatroom","contactId":"qq512436430"}, @李佳芮 no need to ding again, because you are already in ding room)
19:00:59 SILL PadchatRpc rpcCall(WXSendMsg, ["6350854677@chatroom","@李佳芮 no need to ding again, because you are already in ding room",""])
19:00:59 VERB Contact say(I found you have joined in room ding - welcome 李佳芮!)
19:00:59 VERB PuppetPadchat messageSend({"contactId":"qq512436430"}, I found you have joined in room ding - welcome 李佳芮!)
19:00:59 SILL PadchatRpc rpcCall(WXSendMsg, ["qq512436430","I found you have joined in room ding - welcome 李佳芮!",""]) |
This was referenced Jun 14, 2018
fix |
Awesome. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wechaty version: 0.15.150
should refresh room data when there is the following room event:
The text was updated successfully, but these errors were encountered: