From 4b47521a0fe15dcc8e775e616915a3628c30d9b2 Mon Sep 17 00:00:00 2001 From: cunhanfeng Date: Thu, 30 Apr 2026 16:33:43 +0800 Subject: [PATCH] feat: expose URL for link messages (app_type=5) Link messages previously only printed the title, hiding the actual URL stored in . This made it impossible to retrieve the original link target without querying the database directly. Append the URL on an indented continuation line, matching the existing pattern used for file messages and quoted messages. --- wechat_cli/core/messages.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wechat_cli/core/messages.py b/wechat_cli/core/messages.py index d62ef33..4bc37f6 100644 --- a/wechat_cli/core/messages.py +++ b/wechat_cli/core/messages.py @@ -195,7 +195,11 @@ def _format_app_message_text(content, local_type, is_group, chat_username, chat_ return f"[文件] {title}\n {os.path.join(file_dir, f)}" return f"[文件] {title}" if title else "[文件]" if app_type == 5: - return f"[链接] {title}" if title else "[链接]" + url = _collapse_text(appmsg.findtext('url') or '') + label = f"[链接] {title}" if title else "[链接]" + if url: + label += f"\n {url}" + return label if app_type in (33, 36, 44): return f"[小程序] {title}" if title else "[小程序]" if title: