reywechat 1.0.49__py3-none-any.whl → 1.0.50__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- reywechat/rdb.py +3 -3
- reywechat/rreceive.py +3 -4
- reywechat/rsend.py +6 -5
- reywechat/rwechat.py +3 -1
- {reywechat-1.0.49.dist-info → reywechat-1.0.50.dist-info}/METADATA +1 -1
- {reywechat-1.0.49.dist-info → reywechat-1.0.50.dist-info}/RECORD +8 -8
- {reywechat-1.0.49.dist-info → reywechat-1.0.50.dist-info}/WHEEL +0 -0
- {reywechat-1.0.49.dist-info → reywechat-1.0.50.dist-info}/licenses/LICENSE +0 -0
reywechat/rdb.py
CHANGED
@@ -19,7 +19,7 @@ from reykit.rwrap import wrap_thread
|
|
19
19
|
|
20
20
|
from .rbase import WeChatBase
|
21
21
|
from .rreceive import WeChatMessage
|
22
|
-
from .rsend import WeChatSendTypeEnum, WeChatSendParameter
|
22
|
+
from .rsend import WeChatSendTypeEnum, WeChatSendStatusEnum, WeChatSendParameter
|
23
23
|
from .rwechat import WeChat
|
24
24
|
|
25
25
|
|
@@ -1077,7 +1077,7 @@ class WeChatDatabase(WeChatBase):
|
|
1077
1077
|
"""
|
1078
1078
|
|
1079
1079
|
# Check.
|
1080
|
-
if send_param.status !=
|
1080
|
+
if send_param.status != WeChatSendStatusEnum.SENT:
|
1081
1081
|
return
|
1082
1082
|
|
1083
1083
|
# Handle parameter.
|
@@ -1206,7 +1206,7 @@ class WeChatDatabase(WeChatBase):
|
|
1206
1206
|
send_id,
|
1207
1207
|
**parameter
|
1208
1208
|
)
|
1209
|
-
send_param.status =
|
1209
|
+
send_param.status = WeChatSendStatusEnum.WAIT
|
1210
1210
|
self.wechat.sender.queue.put(send_param)
|
1211
1211
|
|
1212
1212
|
# Commit.
|
reywechat/rreceive.py
CHANGED
@@ -27,7 +27,7 @@ from reykit.rtime import now, sleep, wait, to_time, time_to
|
|
27
27
|
from reykit.rwrap import wrap_thread, wrap_exc
|
28
28
|
|
29
29
|
from .rbase import WeChatBase, WeChatTriggerError
|
30
|
-
from .rsend import WeChatSendTypeEnum
|
30
|
+
from .rsend import WeChatSendTypeEnum, WeChatSendStatusEnum
|
31
31
|
from .rwechat import WeChat
|
32
32
|
|
33
33
|
|
@@ -67,7 +67,8 @@ class WeChatMessage(WeChatBase):
|
|
67
67
|
WeChat message type.
|
68
68
|
"""
|
69
69
|
|
70
|
-
|
70
|
+
SendTypeEnum = WeChatSendTypeEnum
|
71
|
+
SendStatusEnum = WeChatSendStatusEnum
|
71
72
|
|
72
73
|
|
73
74
|
def __init__(
|
@@ -1095,8 +1096,6 @@ class WechatReceiver(WeChatBase):
|
|
1095
1096
|
WeChat receiver type.
|
1096
1097
|
"""
|
1097
1098
|
|
1098
|
-
TypeEnum = WeChatSendTypeEnum
|
1099
|
-
|
1100
1099
|
|
1101
1100
|
def __init__(
|
1102
1101
|
self,
|
reywechat/rsend.py
CHANGED
@@ -79,8 +79,8 @@ class WeChatSendParameter(WeChatBase):
|
|
79
79
|
WeChat send parameters type.
|
80
80
|
"""
|
81
81
|
|
82
|
-
|
83
|
-
|
82
|
+
SendTypeEnum = WeChatSendTypeEnum
|
83
|
+
SendStatusEnum = WeChatSendStatusEnum
|
84
84
|
|
85
85
|
|
86
86
|
@overload
|
@@ -204,7 +204,8 @@ class WeChatSender(WeChatBase):
|
|
204
204
|
WeChatSendTypeEnum : Send type enumeration.
|
205
205
|
"""
|
206
206
|
|
207
|
-
|
207
|
+
SendTypeEnum = WeChatSendTypeEnum
|
208
|
+
SendStatusEnum = WeChatSendStatusEnum
|
208
209
|
|
209
210
|
|
210
211
|
def __init__(self, wechat: WeChat) -> None:
|
@@ -267,7 +268,7 @@ class WeChatSender(WeChatBase):
|
|
267
268
|
# Save.
|
268
269
|
send_param.exc_reports.append(exc_text)
|
269
270
|
|
270
|
-
send_param.status =
|
271
|
+
send_param.status = WeChatSendStatusEnum.SENT
|
271
272
|
|
272
273
|
## Handler.
|
273
274
|
for handler in self.handlers:
|
@@ -462,7 +463,7 @@ class WeChatSender(WeChatBase):
|
|
462
463
|
receive_id,
|
463
464
|
**params
|
464
465
|
)
|
465
|
-
send_param.status =
|
466
|
+
send_param.status = WeChatSendStatusEnum.INIT
|
466
467
|
handle_handler_exception = lambda exc_text, *_: send_param.exc_reports.append(exc_text)
|
467
468
|
|
468
469
|
# Handler.
|
reywechat/rwechat.py
CHANGED
@@ -69,7 +69,7 @@ class WeChat(WeChatBase):
|
|
69
69
|
from .rdb import WeChatDatabase
|
70
70
|
from .rlog import WeChatLog
|
71
71
|
from .rreceive import WechatReceiver
|
72
|
-
from .rsend import WeChatSender
|
72
|
+
from .rsend import WeChatSendTypeEnum, WeChatSendStatusEnum, WeChatSender
|
73
73
|
|
74
74
|
# Set attribute.
|
75
75
|
self.project_dir = project_dir or os_getcwd()
|
@@ -100,6 +100,8 @@ class WeChat(WeChatBase):
|
|
100
100
|
self.trigger_add_rule = self.trigger.add_rule
|
101
101
|
|
102
102
|
## Send.
|
103
|
+
self.SendTypeEnum = WeChatSendTypeEnum
|
104
|
+
self.SendstatusEnum = WeChatSendStatusEnum
|
103
105
|
self.send_add_handler = self.sender.add_handler
|
104
106
|
self.send = self.sender.send
|
105
107
|
self.send_start = self.sender.start
|
@@ -3,14 +3,14 @@ reywechat/rall.py,sha256=5J_X-XMOyb1Vp1jyS9-oRFXGOtp2vRPX1g3tJot_Eck,371
|
|
3
3
|
reywechat/rbase.py,sha256=hbxn5spvcl_C_Bw8A9teulOXT9GMlxUw145_YbXIOzc,1124
|
4
4
|
reywechat/rcache.py,sha256=7UsHHfgFOgxuSqlTSAO6CprgUUOeBCXYus0kxmRBQxk,908
|
5
5
|
reywechat/rclient.py,sha256=lc1CPle9h08mwP8NlJN0ybzcNJxtpV0ma6q6cz1RIxk,22518
|
6
|
-
reywechat/rdb.py,sha256=
|
6
|
+
reywechat/rdb.py,sha256=YHkW81RZIdHCt2vvjgFKOZxU-EHyVf9F_XT_nOc7jxg,47354
|
7
7
|
reywechat/rlog.py,sha256=4EsTgrgC05JvWeKAucUaWGga638CRRJISJN6qncBCAw,5249
|
8
|
-
reywechat/rreceive.py,sha256=
|
9
|
-
reywechat/rsend.py,sha256=
|
8
|
+
reywechat/rreceive.py,sha256=ezz6-RVKWmll-TuKXaAnmQRRQdn91v6DJlfpWcTuG20,36213
|
9
|
+
reywechat/rsend.py,sha256=TiSjHMccbjM2U6na3xPGKq3RhoaW23-BsgLdRyJSGEw,18047
|
10
10
|
reywechat/rtrigger.py,sha256=WdOQwobPdGPyyE9J-qtQFPd60713T0aWqKk02PLdCRE,4966
|
11
|
-
reywechat/rwechat.py,sha256=
|
11
|
+
reywechat/rwechat.py,sha256=nIyrf3hB3n03picxV1f1hWNFzhFOXcV201ZuS97P3N4,4741
|
12
12
|
reywechat/data/client_api.dll,sha256=H9uj-x9Ztg0jFZK0yY6NsnyH5_119dQRFfoVVMidxRs,592384
|
13
|
-
reywechat-1.0.
|
14
|
-
reywechat-1.0.
|
15
|
-
reywechat-1.0.
|
16
|
-
reywechat-1.0.
|
13
|
+
reywechat-1.0.50.dist-info/METADATA,sha256=AlBjYWk7HvQsccQ_YggBO5OpES7JFw8YwpgEtRNZGww,1551
|
14
|
+
reywechat-1.0.50.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
+
reywechat-1.0.50.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
|
16
|
+
reywechat-1.0.50.dist-info/RECORD,,
|
File without changes
|
File without changes
|