Browse Source

消息发送接口返回优化

master
wanghongjun 7 months ago
parent
commit
46c1d77b76
  1. 2
      app/enterprise/model/Message.php

2
app/enterprise/model/Message.php

@ -261,6 +261,7 @@ class Message extends BaseModel
$sendData['toContactId']=$uid;
}
$sendData['fromUser']['id']=(int)$sendData['fromUser']['id'];
$sendData['from_user']=(int)$sendData['fromUser']['id'];
$sendData['fileSize']=$fileSzie;
$sendData['fileName']=$fileName;
if(in_array($sendData['type'],self::$fileType)){
@ -285,6 +286,7 @@ class Message extends BaseModel
$user=new User();
// 将聊天窗口的联系人信息带上,方便临时会话
$sendData['contactInfo']=$user->setContact($sendData['toContactId'],$is_group,$sendData['type'],$sendData['content']);
$sendData['toContactId']=$data['to_user'];
// 向发送方发送消息
wsSendMsg($toContactId,$type,$sendData,$is_group);
// 判断图片查看

Loading…
Cancel
Save