只用表情 XML 里的 md5 + len/totallen 作为发送参数。

不再用图片文件大小、文件名等回退逻辑去“猜参数”。
发送接口不再“先返回发送中”,而是直接调用 SendEmoji 并等待结果:
成功才返回 表情发送成功
失败直接返回具体错误(不会再假成功)
This commit is contained in:
liuwei
2026-04-15 11:36:22 +08:00
parent d0fa823557
commit ee5c1ebadc
4 changed files with 55 additions and 30 deletions

View File

@@ -286,6 +286,12 @@ def get_hourly_message_trend():
@login_required
def message_media_proxy():
target_url = request.args.get('url', '').strip()
if not target_url:
return Response("missing url", status=400)
if target_url.startswith("<"):
return Response("invalid media url", status=400)
if not re.match(r"^https?://", target_url, flags=re.IGNORECASE):
return Response("unsupported media url", status=400)
try:
return _proxy_remote_media(target_url)
except Exception as e: