reywechat 1.0.71__py3-none-any.whl → 1.0.72__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/rclient.py CHANGED
@@ -11,6 +11,7 @@
11
11
 
12
12
  from typing import Any, TypedDict, Literal, Final
13
13
  from os.path import abspath as os_abspath
14
+ from reykit.rbase import throw
14
15
  from reykit.rdll import inject_dll
15
16
  from reykit.rnet import request as reykit_request
16
17
  from reykit.ros import find_relpath
@@ -678,6 +679,10 @@ class WeChatClient(WeChatBase):
678
679
  text : Message text.
679
680
  """
680
681
 
682
+ # Check.
683
+ if text == '':
684
+ throw(ValueError, text)
685
+
681
686
  # Handle parameter.
682
687
  api = 'sendTextMsg'
683
688
  data = {
@@ -708,6 +713,10 @@ class WeChatClient(WeChatBase):
708
713
  text : Message text.
709
714
  """
710
715
 
716
+ # Check.
717
+ if text == '':
718
+ throw(ValueError, text)
719
+
711
720
  # Handle parameter.
712
721
  api = 'sendAtText'
713
722
  if type(user_id) != str:
reywechat/rreceive.py CHANGED
@@ -202,7 +202,7 @@ class WeChatMessage(WeChatBase):
202
202
 
203
203
 
204
204
  @property
205
- def user_name(self) -> str:
205
+ def user_name(self) -> str | None:
206
206
  """
207
207
  Message sender user name.
208
208
 
@@ -211,6 +211,10 @@ class WeChatMessage(WeChatBase):
211
211
  User name.
212
212
  """
213
213
 
214
+ # Break.
215
+ if self.user is None:
216
+ return
217
+
214
218
  # Cache.
215
219
  if 'user_name' in self._cache:
216
220
  return self._cache['user_name']
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reywechat
3
- Version: 1.0.71
3
+ Version: 1.0.72
4
4
  Summary: WeChat method set.
5
5
  Project-URL: homepage, https://github.com/reyxbo/reywechat/
6
6
  Author-email: Rey <reyxbo@163.com>
@@ -2,15 +2,15 @@ reywechat/__init__.py,sha256=FXc3XSiPLLmz9bgZdiYKxeWX-7VT9RqPc_EkXp3Kk0I,476
2
2
  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=5FIa8UB3VsLHT_EXHHmFP62a5AeS22anJCJXC8t4tWw,908
5
- reywechat/rclient.py,sha256=lc1CPle9h08mwP8NlJN0ybzcNJxtpV0ma6q6cz1RIxk,22518
5
+ reywechat/rclient.py,sha256=ayOtQ0CaF8ydXjirLdVed8FbpfdQVTKVSd0x4grs-pQ,22712
6
6
  reywechat/rdb.py,sha256=R3ZySPsLM5g0hChFBMxtG9MRZCZ433aMYa_LuggKK90,51010
7
7
  reywechat/rlog.py,sha256=TSA-_5pwlq0sUND2cnLDqXvdmAdMAkC7tXIz3WfJ7Xw,5259
8
- reywechat/rreceive.py,sha256=QKaGjp-7Dy2i3nXOxQK-ES5EjkmDLguZBwv0XNfy3Nk,50603
8
+ reywechat/rreceive.py,sha256=ndRLm9Y8hhOJUepa4PSURFhxfYCmgx23_zAZIQ0yCxg,50681
9
9
  reywechat/rsend.py,sha256=BB42r24x37V1tb27HLhnB_2tILv-DW26F9QbhqiNes8,20101
10
10
  reywechat/rtrigger.py,sha256=WdOQwobPdGPyyE9J-qtQFPd60713T0aWqKk02PLdCRE,4966
11
11
  reywechat/rwechat.py,sha256=g0pbprMPv_qWb_lGFrPDAWsJO4vPSIgFLkw0Y28CZUo,4751
12
12
  reywechat/data/client_api.dll,sha256=H9uj-x9Ztg0jFZK0yY6NsnyH5_119dQRFfoVVMidxRs,592384
13
- reywechat-1.0.71.dist-info/METADATA,sha256=GzBgacCnc2PG5WSLSfIIABVTYVlS5mxec9fofqmM0lI,1551
14
- reywechat-1.0.71.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
- reywechat-1.0.71.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
16
- reywechat-1.0.71.dist-info/RECORD,,
13
+ reywechat-1.0.72.dist-info/METADATA,sha256=0BdkgMmH9rlg5rHX9xovbm9zlHOIfsuVH1Ls-xvDzUc,1551
14
+ reywechat-1.0.72.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
+ reywechat-1.0.72.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
16
+ reywechat-1.0.72.dist-info/RECORD,,