1
This commit is contained in:
@@ -278,7 +278,7 @@ class ImService extends BaseService
|
||||
}
|
||||
|
||||
// 发送自定义消息
|
||||
public function sendCustomMessage(string $from_user_id,string $to_user_id,string $content,string $order_inquiry_id,int $inquiry_type): void
|
||||
public function sendCustomMessage(string $from_user_id,string $to_user_id,string $content,string $order_inquiry_id,int $inquiry_type, array $cloud_custom_data): void
|
||||
{
|
||||
if (!empty($from_user_id)){
|
||||
// 检测并创建发送者资料
|
||||
@@ -295,7 +295,7 @@ class ImService extends BaseService
|
||||
$arg['From_Account'] = $from_user_id; // 发送方user_id 如系统发送,无需填写
|
||||
}
|
||||
$arg['To_Account'] = $to_user_id; // 接收方user_id
|
||||
$arg['ForbidCallbackControl'] = ['ForbidBeforeSendMsgCallback'];
|
||||
$arg['ForbidCallbackControl'] = ['ForbidBeforeSendMsgCallback','ForbidAfterSendMsgCallback'];
|
||||
$arg['SendMsgControl'] = ['NoUnread'];
|
||||
|
||||
$arg['MsgBody'] = [
|
||||
@@ -308,12 +308,10 @@ class ImService extends BaseService
|
||||
];
|
||||
|
||||
// 自定义消息
|
||||
$cloud_custom_data = array();
|
||||
$cloud_custom_data['order_inquiry_id'] = $order_inquiry_id;
|
||||
$cloud_custom_data['is_system'] = 1;
|
||||
$cloud_custom_data['inquiry_type'] = $inquiry_type;
|
||||
|
||||
$arg['CloudCustomData'] = json_encode($cloud_custom_data,JSON_UNESCAPED_UNICODE);
|
||||
$arg['CloudCustomData'] = "";
|
||||
if (!empty($cloud_custom_data)){
|
||||
$arg['CloudCustomData'] = json_encode($cloud_custom_data,JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
$message->sendMessage($arg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user