love_php/app/Services/ImCallback/Message/ImCallbackMessageService.php

43 lines
1.1 KiB
PHP
Raw Normal View History

2026-04-02 09:20:51 +08:00
<?php
namespace App\Services\ImCallback\Message;
class ImCallbackMessageService
{
/**
* 会话具体类型PERSON单聊会话内消息、TEAM群聊会话内消息、SUPER_TEAM超大群聊会话内消息
* CUSTOM_PERSON单聊自定义系统通知及内置好友系统通知、CUSTOM_TEAM群聊自定义系统通知及内置群聊系统通知
* @return void
*/
public function handleMessage($type)
{
if(!in_array($type,['TEAM','PERSON'])){
return;
}
switch ($type){
case 'TEAM':
$client = new Team();
break;
case 'PERSON':
$client = new Person();
break;
}
$client->handle();
}
// 消息撤回
public function recallMessage($type) {
if(!in_array($type,['TEAM','PERSON'])){
return;
}
switch ($type){
case 'TEAM':
$client = new Team();
break;
case 'PERSON':
$client = new Person();
break;
}
$client->recall();
}
}