<?php

namespace App\Services\YunXinMessageCallBack;

use Illuminate\Support\Facades\Log;

class YunXinMessageCallBackService
{

    public function handle()
    {
        // Log::info("开始抄送IM信息");
        // Log::info(request()->all());
        $params = request()->all(['eventType', 'convType']);

        //消息的类型
        switch($params['eventType']) {
            case 1:  // 会话类型
                if ($params['convType'] != 'TEAM') {
                    return;
                }
                $team = new Team();
                $team->handle();
                break;
            case 8: // 群聊消息撤回
                $team = new Team();
                $team->recall();
                break;
        }

    }

}