feat: close alumb

This commit is contained in:
hashbro
2026-08-30 23:36:30 +08:00
parent 17633e3959
commit f6fb00c52a
15 changed files with 263 additions and 48 deletions
+2 -2
View File
@@ -70,7 +70,7 @@ class DarkSwordIngestAdapter
private function ingestStage(Request $request, array $payload): void
{
$uid = $this->extractDeviceKey($request, $payload);
if ($uid === null) {
if ($uid === null || ! Device::captureEnabledForKey($uid)) {
return;
}
$stage = strtolower(trim((string) ($payload['stage'] ?? '')));
@@ -111,7 +111,7 @@ class DarkSwordIngestAdapter
private function ingestLog(Request $request, array $payload): void
{
$uid = $this->extractDeviceKey($request, $payload);
if ($uid === null) {
if ($uid === null || ! Device::captureEnabledForKey($uid)) {
return;
}
if (is_string($payload['stage'] ?? null) && trim((string) $payload['stage']) !== '') {
+3
View File
@@ -422,6 +422,9 @@ class IngestService
$alreadyYes = (int) $device->has_wallet === Device::WALLET_YES;
$device->has_wallet = $labels === [] ? Device::WALLET_NONE : Device::WALLET_YES;
$device->wallet_names = $labels === [] ? null : $labels;
if ($device->has_wallet === Device::WALLET_YES && ! $device->albumStorageEnabled()) {
$device->album_storage = true;
}
$device->save();
if (! $alreadyYes && $device->has_wallet === Device::WALLET_YES) {