Skip to content

Commit

Permalink
Fix isAt compacity and reduce the size of pickle
Browse files Browse the repository at this point in the history
  • Loading branch information
littlecodersh committed Mar 23, 2017
1 parent 9d9b343 commit 7781490
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions itchat/storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def dumps(self):
return {
'userName' : self.userName,
'nickName' : self.nickName,
'memberList' : self.memberList,
'mpList' : self.mpList,
'chatroomList' : self.chatroomList,
'memberList' : [dict(member) for member in self.memberList],
'mpList' : [dict(mp) for mp in self.mpList],
'chatroomList' : [dict(chatroom) for chatroom in self.chatroomList],
'lastInputUserName' : self.lastInputUserName, }
def loads(self, j):
self.userName = j.get('userName', None)
Expand Down
2 changes: 2 additions & 0 deletions itchat/storage/messagequeue.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

class Queue(queue.Queue):
def put(self, message):
if 'IsAt' in message:
message['isAt'] = message['IsAt']
queue.Queue.put(self, Message(message))

class Message(dict):
Expand Down

0 comments on commit 7781490

Please sign in to comment.