使用path 进行预览发送

This commit is contained in:
liuwei
2025-06-10 13:50:45 +08:00
parent 4d9d0ca424
commit 288439f458
2 changed files with 4 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ import json
import uuid
from datetime import datetime
from flask import Blueprint, render_template, jsonify, request, current_app, session
from pathlib import Path
from werkzeug.utils import secure_filename
from .auth import login_required
from loguru import logger
@@ -287,7 +288,7 @@ def api_preview_task(task_id):
# 发送图片消息
if task.get('content_image'):
send_message_in_thread(server.client.send_image_message, recipient, task['content_image'])
send_message_in_thread(server.client.send_image_message, recipient, Path(task['content_image']))
# 发送链接消息
if task.get('content_link'):