fix: 修复文件协作不提醒的问题

This commit is contained in:
kuaifan
2022-04-12 11:18:44 +08:00
parent b1ee3fe3cd
commit 9ffa46a878
6 changed files with 30 additions and 24 deletions

View File

@@ -145,10 +145,10 @@ class WebSocketService implements WebSocketHandlerInterface
$pathOld = $row->path;
$row->path = $pathNew;
$row->save();
if (preg_match("/^file\/content\/\d+$/", $pathOld)) {
if (preg_match("/^\/single\/file\/\d+$/", $pathOld)) {
$this->pushPath($pathOld);
}
if (preg_match("/^file\/content\/\d+$/", $pathNew)) {
if (preg_match("/^\/single\/file\/\d+$/", $pathNew)) {
$this->pushPath($pathNew);
}
}
@@ -211,7 +211,7 @@ class WebSocketService implements WebSocketHandlerInterface
/** @var WebSocket $item */
foreach ($list as $item) {
$item->delete();
if ($item->path && str_starts_with($item->path, "file/content/")) {
if ($item->path && str_starts_with($item->path, "/single/file/")) {
$array[$item->path] = $item->path;
}
}