mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
perf: 优化图文消息
This commit is contained in:
parent
e32a3887cd
commit
c128c58110
@ -901,7 +901,11 @@ class WebSocketDialogMsg extends AbstractModel
|
|||||||
foreach ($matchs[2] as $key => $str) {
|
foreach ($matchs[2] as $key => $str) {
|
||||||
$parsed = parse_url($str);
|
$parsed = parse_url($str);
|
||||||
if (str_starts_with($parsed['path'], "/uploads/")) {
|
if (str_starts_with($parsed['path'], "/uploads/")) {
|
||||||
$str = "{{RemoteURL}}" . ltrim($parsed['path'], "/");
|
$relativePath = ltrim($parsed['path'], "/");
|
||||||
|
$relativePath = Base::thumbRestore($relativePath);
|
||||||
|
if (file_exists(public_path($relativePath))) {
|
||||||
|
$str = "{{RemoteURL}}{$relativePath}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($imageSaveLocal === 'close') {
|
if ($imageSaveLocal === 'close') {
|
||||||
$imageSize = @getimagesize($str);
|
$imageSize = @getimagesize($str);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user