no message

This commit is contained in:
kuaifan
2024-05-12 13:16:39 +09:00
parent 4625ae7548
commit eda9eb08d5
2 changed files with 20 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Models;
use Carbon\Carbon;
use App\Module\Base;
use App\Module\Doo;
use App\Module\Image;
use App\Tasks\PushTask;
use App\Exceptions\ApiException;
@@ -154,6 +155,13 @@ class WebSocketDialogMsg extends AbstractModel
$msg['thumb'] = Base::fillUrl($msg['thumb'] ?: Base::extIcon($msg['ext']));
} else if ($type === 'record') {
$msg['path'] = Base::fillUrl($msg['path']);
$textUserid = is_array($msg['text_userid']) ? $msg['text_userid'] : [];
if (isset($msg['text_userid'])) {
unset($msg['text_userid']);
}
if ($msg['text'] && !in_array(Doo::userId(), $textUserid)) {
$msg['text'] = "";
}
}
return $msg;
}