From d55098f8151d38e790420bdca302e3beb66fdf7a Mon Sep 17 00:00:00 2001 From: gzydong <837215079@qq.com> Date: Tue, 31 Aug 2021 21:31:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/Message/SubscribeHandleService.php | 7 +++++++ 1 file changed, 7 insertions(+) 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;