love_php/app/Services/ImCallback/Message/ImCallbackMessageService.php
2026-04-02 09:20:51 +08:00

43 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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();
}
}