diff --git a/app/Service/Message/SubscribeHandleService.php b/app/Service/Message/SubscribeHandleService.php index 8ee33ad..19736fa 100644 --- a/app/Service/Message/SubscribeHandleService.php +++ b/app/Service/Message/SubscribeHandleService.php @@ -95,6 +95,8 @@ class SubscribeHandleService $groupInfo = GroupCache::getInstance()->getOrSetCache($receiver_id); } + if (empty($fds)) return; + $fds = array_unique(array_merge(...$fds)); // 客户端ID去重 @@ -154,6 +156,9 @@ class SubscribeHandleService $status = (int)$data['data']['status']; $ids = di()->get(UserService::class)->getFriendIds($user_id); + + if (empty($ids)) return; + $fds = []; foreach ($ids as $friend_id) { $fds[] = $this->clientService->findUserFds(intval($friend_id)); @@ -188,6 +193,8 @@ class SubscribeHandleService } } + if (empty($fds)) return; + $fds = array_unique(array_merge(...$fds)); if (!$fds) return;