mirror of
https://github.com/LifeArchiveProject/WeChatDataAnalysis.git
synced 2026-06-18 15:54:08 +08:00
fix(chat): 修复 list_chat_messages 中 re 作用域遮蔽
- 移除函数内局部 import re,避免遮蔽模块级 re。 - 保持 emojiUrl 处理后续正则逻辑可稳定执行。 - 新增回归测试,覆盖模板解析路径,防止同类作用域问题复发。
This commit is contained in:
@@ -5494,8 +5494,6 @@ def list_chat_messages(
|
||||
|
||||
if existing_local:
|
||||
try:
|
||||
import re
|
||||
|
||||
cur = str(m.get("emojiUrl") or "")
|
||||
if cur and re.match(r"^https?://", cur, flags=re.I) and ("/api/chat/media/emoji" not in cur):
|
||||
m["emojiRemoteUrl"] = cur
|
||||
|
||||
Reference in New Issue
Block a user