fix 微信消息转发v2.7特殊消息指定用户支持title匹配

This commit is contained in:
thsrite
2024-06-14 16:17:25 +08:00
parent 4300a143f0
commit 0fa48862ba
4 changed files with 7 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ MoviePilot三方插件市场https://github.com/thsrite/MoviePilot-Plugins/
- [短剧刮削 v3.2](docs%2FShortPlayMonitor.md)
- 云盘实时监控 v2.2
- 源文件恢复 v1.2
- [微信消息转发 v2.6](docs%2FWeChatForward.md)
- [微信消息转发 v2.7](docs%2FWeChatForward.md)
- 订阅下载统计 v1.5
- [自定义命令 v1.7](docs%2FCustomCommand.md)
- docker自定义任务 v1.3

View File

@@ -28,9 +28,9 @@
#### 特定消息指定用户
`title正则 > text正则 > userid`
`title正则 > text|title正则 > userid`
当要发送的消息的title和text均匹配正则则强制指定该消息的userid
当要发送的消息的`title``text|title`均匹配正则则强制指定该消息的userid
#### 2.0版本兼容旧版配置

View File

@@ -288,11 +288,12 @@
"name": "微信消息转发",
"description": "根据正则转发通知到其他WeChat应用。",
"labels": "消息通知",
"version": "2.6",
"version": "2.7",
"icon": "Wechat_A.png",
"author": "thsrite",
"level": 1,
"history": {
"v2.7": "特殊消息指定用户支持title匹配",
"v2.6": "已完成订阅额外消息查询订阅历史订阅用户",
"v2.5.1": "修复token过期重发未存储userid问题",
"v2.5": "增强额外消息发送",

View File

@@ -22,7 +22,7 @@ class WeChatForward(_PluginBase):
# 插件图标
plugin_icon = "Wechat_A.png"
# 插件版本
plugin_version = "2.6"
plugin_version = "2.7"
# 插件作者
plugin_author = "thsrite"
# 作者主页
@@ -687,7 +687,7 @@ class WeChatForward(_PluginBase):
specify = specify_conf.split(" > ")
if len(specify) != 3:
continue
if re.search(specify[0], title) and re.search(specify[1], text):
if re.search(specify[0], title) and (re.search(specify[1], text) or re.search(specify[1], title)):
userid = specify[2]
logger.info(f"消息 {title} {text} 指定用户 {userid}")
break