只用表情 XML 里的 md5 + len/totallen 作为发送参数。
不再用图片文件大小、文件名等回退逻辑去“猜参数”。 发送接口不再“先返回发送中”,而是直接调用 SendEmoji 并等待结果: 成功才返回 表情发送成功 失败直接返回具体错误(不会再假成功)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user