Closed YangTe1 closed 3 years ago
It run correctly at my room-join
event. Can you reproduce it again ?
And more, what version of your python-wechaty
, python-wechaty-puppet
, python-wechaty-puppet-hostie
. Thanks for your issue.
Emm.. It caused ERROR again. wechaty 0.6.10 wechaty-puppet 0.0.16 wechaty-puppet-hostie 0.2.12
Please keep eyes on this issue, we will mention you if a new version is deployed. 👾. 👾
Ok, thanks
@YangTe1
try as below , pay attention to room_join
parameter payload: EventRoomJoinPayload
:
async def main():
global bot
bot = Wechaty()
bot.on('room-join', room_join)
bot.start()
from wechaty_puppet import EventRoomJoinPayload
async def room_join(payload: EventRoomJoinPayload, room: Room, invitees: list, inviter: Contact, date: datetime):
pass
I'm not test for the newest version, but it works on
wechaty 0.6.8
wechaty-puppet 0.0.16
wechaty-puppet-hostie 0.2.12
@why2lyj 不行的,还是同样的报错 所以如果这些py库版本都相同,却返回不同的结果会不会是因为某些环境的不同,服务端这个时间戳返回的格式不一样? 我那个hostie用的也是wechaty/wechaty的最新镜像
FYI,我测试时手机端微信用的是安卓机登录,不知道和这个是否有关? @wj-Mcat
:thinking: Interesting, I'm not meeting this issue ...
@YangTe1 are you still facing this issue? Let me know, pls.
@YangTe1 please keep eyes on this #137 pr. When it has been merged, you can update your wechaty version to check for your problem. Hope it will resolve your problem. Thanks a lot.
Describe the bug When i add a listener for 'room-join'
bot.on('room-join', on_room_join)
It showsAnd I found the source code is: (wechaty/wechaty.py line 593)
payload.time_stamp -> 1597809084043. It's a milliseconds timestamp. datetime.fromtimestamp() -> This function should pass a seconds time stamp instead of milliseconds.