This commit is contained in:
2025-06-26 10:17:21 +08:00
parent a372eb6bd6
commit 6604f4c6aa
2 changed files with 3 additions and 3 deletions

View File

@@ -71,9 +71,9 @@ class GatewayClientService
/**
* 发送消息给指定用户
*/
public function sendToUser(int $toUserId, int $fromUserId, string $fromUserName, string $msgData): void
public function sendToUser(int $toUserId, int $fromUserId, string $fromUserName, string $msgData, string $type = 'chat'): void
{
$message = $this->buildMessage($fromUserId, $fromUserName, $msgData);
$message = $this->buildMessage($fromUserId, $fromUserName, $msgData, $type);
Gateway::sendToUid($toUserId, $message);
}

View File

@@ -26,7 +26,7 @@ class ImService extends BaseService
$this->userId === 1? 2: 1,
$this->userId,
$this->userInfo['nick_name'],
json_encode($data),
$data['content'],
);
return ['发送成功'];
}