|
|
|
@ -354,6 +354,7 @@ class Message extends BaseModel |
|
|
|
if ($is_close) $content = '关闭了自动删除计时器'; |
|
|
|
|
|
|
|
$data=[ |
|
|
|
'id' => \utils\Str::getUuid(), |
|
|
|
'from_user'=>$from_user, |
|
|
|
'to_user'=>$to_user, |
|
|
|
'content'=>str_encipher($content,true), |
|
|
|
@ -375,6 +376,24 @@ class Message extends BaseModel |
|
|
|
$msgInfo['sendTime'] = $data['create_time']; |
|
|
|
$msgInfo['toContactId'] = $msgInfo['is_group'] == 1 ? $msgInfo['chat_identify'] : $to_user; |
|
|
|
$msgInfo['status']='successd'; |
|
|
|
$userList = User::matchUser([$msgInfo], true, 'from_user', 120); |
|
|
|
$fromUser = $userList[$from_user]; |
|
|
|
if ($is_group) { |
|
|
|
$msgInfo['content'] = $fromUser['realname'] . $data['content']; |
|
|
|
} else { |
|
|
|
$msgInfo['content'] = lang('im.you'). $data['content']; |
|
|
|
} |
|
|
|
$msgInfo['formUser'] = $fromUser; |
|
|
|
$msgInfo['download'] = ''; |
|
|
|
$msgInfo['extUrl'] = ''; |
|
|
|
$msgInfo['extends'] = null; |
|
|
|
$msgInfo['fileName'] = null; |
|
|
|
$msgInfo['fileSize'] = 0; |
|
|
|
$msgInfo['file_cate'] = 0; |
|
|
|
$msgInfo['file_id'] = 0; |
|
|
|
$msgInfo['from_user'] = $from_user; |
|
|
|
$msgInfo['preview'] = ""; |
|
|
|
$msgInfo['toContactId'] = $to_user; |
|
|
|
return $msgInfo; |
|
|
|
} |
|
|
|
} |