This commit is contained in:
hashbro
2026-08-27 01:28:15 +08:00
parent 3a2be309dc
commit e660335808
9 changed files with 178 additions and 11 deletions
+2 -4
View File
@@ -153,10 +153,9 @@ class DarkSwordIngestAdapter
$ip = $this->clientIp($request, $payload);
$referer = trim((string) $request->headers->get('referer', ''));
PageVisit::query()->create([
PageVisit::recordLanding([
'channel_id' => $channel,
'client_uid' => $uid,
'chain' => PageVisit::CHAIN_DARKSWORD,
'user_agent' => $ua !== '' ? $ua : null,
'os' => $ios !== null ? 'iOS' : $parsed['os'],
'os_version' => $ios ?? ($parsed['os_version'] !== '' ? $parsed['os_version'] : null),
@@ -165,8 +164,7 @@ class DarkSwordIngestAdapter
'ip' => $ip !== '' ? $ip : null,
'domain' => PageVisit::normalizeDomain($request->getHost()),
'referer' => $referer !== '' ? substr($referer, 0, 512) : null,
'created_at' => now(),
]);
], PageVisit::CHAIN_DARKSWORD);
}
/**