This commit is contained in:
@@ -1232,6 +1232,23 @@ class UserService extends BaseService
|
||||
return $result;
|
||||
}
|
||||
|
||||
// === 新增:投递上传OSS队列 ===
|
||||
$mediaTypes = ['TIMImageElem', 'TIMSoundElem', 'TIMVideoFileElem', 'TIMFileElem'];
|
||||
if (in_array($msg_data['MsgBody'][0]['MsgType'], $mediaTypes)) {
|
||||
try {
|
||||
$producer = \Hyperf\Context\ApplicationContext::getContainer()->get(\Hyperf\Amqp\Producer::class);
|
||||
$producerMsg = new \App\Amqp\Producer\UploadImMediaProducer([
|
||||
'message_key' => $msg_data['MsgKey'],
|
||||
'msg_type' => $msg_data['MsgBody'][0]['MsgType'],
|
||||
'msg_content' => $message_content,
|
||||
]);
|
||||
$producer->produce($producerMsg);
|
||||
} catch (\Throwable $e) {
|
||||
Log::getInstance("UserService-userImAfterSendMsg")->error("投递上传OSS队列失败: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
// === 新增结束 ===
|
||||
|
||||
// im消息通知
|
||||
if ($is_system == 0 && isset($message_send_result) && isset($order_inquiry_id)){
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user