<?php


namespace app\listener\chat;

use app\services\chat\MessageService;
use think\swoole\WebSocket;

/**
 * 消息确认监听器
 */
class ChatMessageAck
{
    private $messageService;

    public function __construct()
    {
        $this->messageService = new MessageService();
    }

    public function handle(array $event, WebSocket $ws)
    {
        $this->messageService->acknowledgeMessage($ws, $event);
    }
}
