reywechat 1.0.56__py3-none-any.whl → 1.0.58__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
@@ -318,8 +318,14 @@ class WeChatDatabase(WeChatBase):
318
318
  '50 is voice call or video call invitation message, '
319
319
  '51 is system synchronize data message, '
320
320
  '56 is real time position data message, '
321
- '10000 is system message, '
322
- '10002 is pat or recall message, '
321
+ '10000 is text system message, '
322
+ '10002 is system message ('
323
+ 'date type, '
324
+ '"pat" is pat, '
325
+ '"revokemsg" is recall, '
326
+ '"paymsg" is transfer money tip, '
327
+ 'other omit'
328
+ '), '
323
329
  'other omit.'
324
330
  )
325
331
  },
reywechat/rreceive.py CHANGED
@@ -378,7 +378,7 @@ class WeChatMessage(WeChatBase):
378
378
 
379
379
  ### File uploaded.
380
380
  elif self.is_file_uploaded:
381
- self._text = f'[文件"{self.file['name']}"完成上传]'
381
+ self._text = f'[文件"{self.file['name']}"发送完成]'
382
382
 
383
383
  ### Initiate real time location.
384
384
  elif self.share_type == 17:
@@ -421,7 +421,7 @@ class WeChatMessage(WeChatBase):
421
421
 
422
422
  ### File uploading.
423
423
  elif self.is_file_uploading:
424
- self._text = f'[文件"{self.file_name_uploading}"开始上传]'
424
+ self._text = f'[文件"{self.file_name_uploading}"发送中]'
425
425
 
426
426
  ### Transfer money.
427
427
  elif self.is_money:
reywechat/rsend.py CHANGED
@@ -194,6 +194,72 @@ class WeChatSendParameter(WeChatBase):
194
194
  self.exc_reports: list[str] = []
195
195
  self.status: WeChatSendStatusEnum
196
196
 
197
+ ## Cache.
198
+ self._text: str | None = None
199
+
200
+
201
+ @property
202
+ def text(self) -> str:
203
+ """
204
+ Text description of parameter content.
205
+
206
+ Returns
207
+ -------
208
+ Text.
209
+ """
210
+
211
+ # Cache.
212
+ if self._text is not None:
213
+ return self._text
214
+
215
+ # Get.
216
+ match self.send_type:
217
+
218
+ ## Text.
219
+ case WeChatSendTypeEnum.TEXT:
220
+ self._text = self.params['text']
221
+
222
+ ## Text with '@'.
223
+ case WeChatSendTypeEnum.TEXT_AT:
224
+ self._text = self.params['text']
225
+
226
+ ## File.
227
+ case WeChatSendTypeEnum.FILE:
228
+ self._text = f'[文件"{self.params['file_name']}"发送]'
229
+
230
+ ## Image.
231
+ case WeChatSendTypeEnum.IMAGE:
232
+ self._text = f'[图片"{self.params['file_name']}"发送]'
233
+
234
+ ## Emotion.
235
+ case WeChatSendTypeEnum.EMOTION:
236
+ self._text = f'[动画表情"{self.params['file_name']}"发送]'
237
+
238
+ ## Pat.
239
+ case WeChatSendTypeEnum.PAT:
240
+ user_name = self.sender.wechat.client.get_contact_name(self.params['user_id'])
241
+ self._text = f'[我拍了拍"{user_name}"]'
242
+
243
+ ## Public account.
244
+ case WeChatSendTypeEnum.PUBLIC:
245
+ self._text = f'[公众号"{self.params['title']}"分享]'
246
+ public_name = self.params.get('public_name')
247
+ text = self.params.get('public_name')
248
+ if public_name is not None:
249
+ self._text += f' {public_name}'
250
+ if text is not None:
251
+ self._text += f' {text}'
252
+
253
+ ## Forward.
254
+ case WeChatSendTypeEnum.FORWARD:
255
+ self._text = '[转发了一条消息]'
256
+
257
+ ## Throw exception.
258
+ case send_type:
259
+ throw(ValueError, send_type)
260
+
261
+ return self._text
262
+
197
263
 
198
264
  class WeChatSender(WeChatBase):
199
265
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reywechat
3
- Version: 1.0.56
3
+ Version: 1.0.58
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,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=4or5HV_U4mZwRSiK1fa1wZkhh_KfdtkYoWkEdBDov_Q,48351
6
+ reywechat/rdb.py,sha256=PBEg_9Ig07vwqH3RNLaIWZZD7Joe6MQceiNB21hGAj0,48654
7
7
  reywechat/rlog.py,sha256=4EsTgrgC05JvWeKAucUaWGga638CRRJISJN6qncBCAw,5249
8
- reywechat/rreceive.py,sha256=sdTxF6g4094AZu1lLswcZki21ZfmKIcjZ0520UWLq54,51584
9
- reywechat/rsend.py,sha256=aTmc1ycL8bon4KXoX7VpRWQKTsVER6f6bRLKWWvPspY,18049
8
+ reywechat/rreceive.py,sha256=nNSBDfCwFUK2eiDRgLey1o6uQ4GaaQLGpwrsHjB6nbU,51581
9
+ reywechat/rsend.py,sha256=yrJf9GzWVCDptUHHazhWSVW0nm2LCIbb0sz2EII63bY,20049
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.56.dist-info/METADATA,sha256=kXh3hk31yQmrqGSTMO1qP5SFuh8cgEofH7X17eJQVxk,1551
14
- reywechat-1.0.56.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
- reywechat-1.0.56.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
16
- reywechat-1.0.56.dist-info/RECORD,,
13
+ reywechat-1.0.58.dist-info/METADATA,sha256=lrpYILANeibxRcXZMs10akTvzbvg6d69l4xKDvv0Fvk,1551
14
+ reywechat-1.0.58.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
+ reywechat-1.0.58.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
16
+ reywechat-1.0.58.dist-info/RECORD,,