reywechat 1.0.42__py3-none-any.whl → 1.0.44__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 CHANGED
@@ -941,8 +941,8 @@ class WeChatDatabase(BaseWeChat):
941
941
  """
942
942
 
943
943
  # Check.
944
- if send_param.status == send_param.StatusEnum.SENT:
945
- throw(TypeError, send_param.send_id)
944
+ if send_param.status != send_param.StatusEnum.SENT:
945
+ return
946
946
 
947
947
  # Handle parameter.
948
948
  if send_param.exc_reports == []:
@@ -1054,7 +1054,7 @@ class WeChatDatabase(BaseWeChat):
1054
1054
  # Send.
1055
1055
  for row in table:
1056
1056
  send_id, type_, receive_id, parameter, file_id = row.values()
1057
- send_type = WeChatSendTypeEnum[type_]
1057
+ send_type = WeChatSendTypeEnum(type_)
1058
1058
  parameter: dict = json_loads(parameter)
1059
1059
 
1060
1060
  ## File.
@@ -1118,6 +1118,16 @@ class WeChatDatabase(BaseWeChat):
1118
1118
  )
1119
1119
 
1120
1120
  ## Room.
1121
+ elif message.user is None:
1122
+ result = message.receiver.wechat.database.database_wechat.execute_select(
1123
+ (self.db_names['wechat'], self.db_names['wechat.contact_room']),
1124
+ ['valid'],
1125
+ '`room_id` = :room_id',
1126
+ limit=1,
1127
+ room_id=message.room
1128
+ )
1129
+
1130
+ ## Room user.
1121
1131
  else:
1122
1132
  sql = (
1123
1133
  'SELECT (\n'
reywechat/rsend.py CHANGED
@@ -17,7 +17,6 @@ from functools import wraps as functools_wraps
17
17
  from queue import Queue
18
18
  from re import escape as re_escape
19
19
  from reykit.rbase import throw, catch_exc
20
- from reykit.ros import File
21
20
  from reykit.rre import sub
22
21
  from reykit.rtime import sleep
23
22
  from reykit.rwrap import wrap_thread, wrap_exc
@@ -449,7 +448,7 @@ class WeChatSender(BaseWeChat):
449
448
  # Handle parameter.
450
449
  send_param = WeChatSendParameter(
451
450
  self,
452
- WeChatSendTypeEnum[send_type],
451
+ send_type,
453
452
  receive_id,
454
453
  **params
455
454
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reywechat
3
- Version: 1.0.42
3
+ Version: 1.0.44
4
4
  Summary: WeChat method set.
5
5
  Project-URL: homepage, https://github.com/reyxbo/reywechat/
6
6
  Author-email: Rey <reyxbo@163.com>
@@ -3,15 +3,15 @@ reywechat/rall.py,sha256=zEW-mLL2uP8aT2_foCMFGmMi_3RCrGl8qutnSVkmY1E,397
3
3
  reywechat/rbase.py,sha256=0NunIUIXra2ML2N6odwMk5oENTE0r6VSBHWXUvgI-lc,1124
4
4
  reywechat/rcache.py,sha256=Hh_HE-t_KUMlrz4gEFPh1AjmhnrSgH520IFJPumWb7A,908
5
5
  reywechat/rclient.py,sha256=MEvQB3pHb5ORukKbKntalRtFcKIOP9BGtDsMt5ihQfM,22524
6
- reywechat/rdb.py,sha256=x7wTvE7G4-FJQkZbPHiV4jSchki7RlJFnQPtGzqi4CI,39703
6
+ reywechat/rdb.py,sha256=akIQsx4CZIt-H6kXWn2vpUYjo5MgD8MluzBMnSdmLaM,40051
7
7
  reywechat/rlog.py,sha256=IJL2WquiOYfB9iEai9xjojkuxPxiRHkdzZ5vCeaSA98,5261
8
8
  reywechat/rreceive.py,sha256=40l3n_d1BcT2EhxIYOlOnzrSQkJ8WDI_qPvJcU7CSQU,35018
9
9
  reywechat/rschedule.py,sha256=X9kreXdClTeItJHmNPJNqb_lct-BiLCyusMQxsj5hWU,1865
10
- reywechat/rsend.py,sha256=0rAxVj895QrSxkziT3rqiQBKnOiDv8VFcIaCwoTPxb4,17644
10
+ reywechat/rsend.py,sha256=GfCv5O1-81r-o-RLzMMW_MQE99KwO9gZ3-93HaJ97W8,17595
11
11
  reywechat/rtrigger.py,sha256=n8kUNovh62r7crlXrp33uaKvbILT-wcfvUqeyGt7YhM,4956
12
12
  reywechat/rwechat.py,sha256=OcElINAi9jM-eDb_OTtseBW3kyG_3jD4V4QmltR6MeE,4874
13
13
  reywechat/data/client_api.dll,sha256=H9uj-x9Ztg0jFZK0yY6NsnyH5_119dQRFfoVVMidxRs,592384
14
- reywechat-1.0.42.dist-info/METADATA,sha256=w-XwNxmNdI9E-iJb0WAG7UHeDkZWaK_GNmGPDZRxtGo,1551
15
- reywechat-1.0.42.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
- reywechat-1.0.42.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
17
- reywechat-1.0.42.dist-info/RECORD,,
14
+ reywechat-1.0.44.dist-info/METADATA,sha256=K_Wf9JSHTxKigRfjFyCGWI0UnYZ1ZG_Ie7GRL54ZZHM,1551
15
+ reywechat-1.0.44.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
+ reywechat-1.0.44.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
17
+ reywechat-1.0.44.dist-info/RECORD,,