Ken 1 周之前
父节点
当前提交
d8a4b1fcbb
共有 1 个文件被更改,包括 13 次插入1 次删除
  1. 13 1
      app/Services/BaseService.php

+ 13 - 1
app/Services/BaseService.php

@@ -205,7 +205,19 @@ class BaseService
             if (count($texts) == 0) {
                 $texts[] = $item . "\n";
             } else if (strlen($texts[count($texts) - 1] . $item) <= 4096) {
-                $texts[count($texts) - 1] .= $item . "\n";
+                if (!empty($image)) {
+                    if (count($texts) == 1) {
+                        if (strlen($texts[count($texts) - 1] . $item) <= 1024) {
+                            $texts[count($texts) - 1] .= $item . "\n";
+                        } else {
+                            $texts[] = $item . "\n";
+                        }
+                    } else {
+                        $texts[] = $item . "\n";
+                    }
+                } else {
+                    $texts[count($texts) - 1] .= $item . "\n";
+                }
             } else {
                 $texts[] = $item . "\n";
             }