mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-03-27 10:05:57 +00:00
fix 微信消息转发v2.7特殊消息指定用户支持title匹配
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
|
||||
#### 特定消息指定用户
|
||||
|
||||
`title正则 > text正则 > userid`
|
||||
`title正则 > text|title正则 > userid`
|
||||
|
||||
当要发送的消息的title和text均匹配正则,则强制指定该消息的userid
|
||||
当要发送的消息的`title`和`text|title`均匹配正则,则强制指定该消息的userid
|
||||
|
||||
#### 2.0版本兼容旧版配置
|
||||
|
||||
|
||||
@@ -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": "增强额外消息发送",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user