mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
ws仅加密对话消息
This commit is contained in:
parent
4024cfb7c7
commit
80dd76b078
@ -205,10 +205,13 @@ class PushTask extends AbstractTask
|
|||||||
{
|
{
|
||||||
$encrypt = Base::json2array(Cache::get("User::encrypt:" . $fid));
|
$encrypt = Base::json2array(Cache::get("User::encrypt:" . $fid));
|
||||||
if ($encrypt['type'] == 'pgp') {
|
if ($encrypt['type'] == 'pgp') {
|
||||||
$msg = [
|
if (is_array($msg) && $msg['type'] == 'dialog') {
|
||||||
'type' => 'encrypt',
|
// 仅加密对话消息
|
||||||
'encrypted' => Doo::pgpEncryptApi($msg, $encrypt['key']),
|
$msg = [
|
||||||
];
|
'type' => 'encrypt',
|
||||||
|
'encrypted' => Doo::pgpEncryptApi($msg, $encrypt['key']),
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return Base::array2json($msg);
|
return Base::array2json($msg);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user