Skip to content

Commit 4332bcd

Browse files
authored
Merge pull request #30 from wj-Mcat/master
enable dirty_payload abstract function to puppet
2 parents 14a6a70 + 62cd7a7 commit 4332bcd

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.17
1+
0.0.18

requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pyee
22
requests
3-
chatie-grpc==0.16.1
3+
chatie-grpc>=0.17.dev4
44
qrcode
5+
pylru

src/wechaty_puppet/puppet.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,18 @@
5252
RoomPayload,
5353
RoomMemberPayload,
5454

55-
RoomInvitationPayload
55+
RoomInvitationPayload,
56+
57+
PayloadType
5658

5759
)
5860

5961

6062
class Puppet:
6163
"""
62-
puppet interface class
63-
64-
TODO -> StateSwitch schema
64+
puppet interface class, which is the abstract of puppet implementation.
6565
66+
python-wechaty-puppet-XX can be all of the protocol of IM software.
6667
"""
6768

6869
def __init__(self, options: PuppetOptions, name: str = 'puppet'):
@@ -485,3 +486,9 @@ async def login(self, user_id: str):
485486
:return:
486487
"""
487488
raise NotImplementedError
489+
490+
async def dirty_payload(self, payload_type: PayloadType, payload_id: str):
491+
"""
492+
mark the payload dirty status, and remove
493+
"""
494+
raise NotImplementedError

src/wechaty_puppet/schemas/types.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949

5050
# Event
5151
EventType,
52+
53+
# Payload type
54+
PayloadType
5255
)
5356

5457

@@ -70,5 +73,7 @@
7073

7174
'ImageType',
7275

73-
'EventType'
76+
'EventType',
77+
78+
'PayloadType'
7479
]

0 commit comments

Comments
 (0)