diff --git a/app/Services/GatewayWorker/ImService.php b/app/Services/GatewayWorker/ImService.php index 0a3d90f6..191ff8e5 100644 --- a/app/Services/GatewayWorker/ImService.php +++ b/app/Services/GatewayWorker/ImService.php @@ -4,6 +4,7 @@ namespace App\Services\GatewayWorker; use App\Enum\MessageTypeEnum; use App\Services\Base\BaseService; +use GatewayClient\Gateway; class ImService extends BaseService { @@ -27,6 +28,12 @@ class ImService extends BaseService public function sendMessage($data, $type = MessageTypeEnum::Text->value) { + $uids = [1,2,3]; + $uidsC = []; + foreach ($uids as $v) { + $uidsC[$v] = Gateway::getClientIdByUid($v); + } + ds($uidsC); $data['message_type'] = MessageTypeEnum::from($type)->description(); $this->gatewayClient->sendToUser( $this->userId === 1? 2: 1,