Git Product home page Git Product logo

Comments (7)

littlecodersh avatar littlecodersh commented on May 28, 2024 1

@tylor-e

内容更新
已就报出的bug进行更新:Fix memberList&chatroomList bug [RB#28: tylor-e]
再次表达感谢!

测试代码

import itchat

itchat.auto_login()
print(len(itchat.__client.storageClass.memberList))
print(len(itchat.__client.storageClass.chatroomList))

from itchat.

tylor-e avatar tylor-e commented on May 28, 2024

另外groupDict不是很理解是什么,在memberList空的时候groupDict也是空的,目前给memberList赋值后,groupDict有一个群的成员信息,但是我有不止一个群,这个群成员信息会在什么情况下更新呢,为什么会选了一个群来更新成员信息

from itchat.

littlecodersh avatar littlecodersh commented on May 28, 2024

@tylor-e 修改有道理!下一个版本我改进去
groupDict是在获取一个群的第一条新消息或者群新成员发言时更新的

from itchat.

tylor-e avatar tylor-e commented on May 28, 2024

在对memberList进行赋值的时候会清空web_init里面的一句:

self.storageClass.memberList.append(dic['User'])

这个应该是把自己添加到memberList,个人觉得没什么必要,毕竟自己的信息存在storage里面了,于是auto_login()的倒数第二句修改成

out.print_line('Login successfully as %s\n' % (self.storageClass.nickName), False)

否则会因为查不到自己而现实login successfully as None

from itchat.

littlecodersh avatar littlecodersh commented on May 28, 2024

@tylor-e 有些账号在获取memberList的时候是获取不到自己的信息的,所以才加了那么一句。
第二句我会改进去的:)

from itchat.

tylor-e avatar tylor-e commented on May 28, 2024

@littlecodersh 我就是没获取到自己的信息,但是我觉得不需要把自己加到memberList,所以就没管,用自己的信息直接从storage里调

from itchat.

littlecodersh avatar littlecodersh commented on May 28, 2024

@tylor-e 没获取到是因为之前你发现的那个问题,我更新memberListchatroomList的时候覆盖了,是个Bug。
使用self.storageClass.nickName是有道理的,我会改进去。

from itchat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.