fix: no notification if release check is disabled (#25688)

This commit is contained in:
Jason Rasmussen
2026-01-29 18:31:11 -05:00
committed by GitHub
parent 1a04caee29
commit 0be1ffade6
2 changed files with 14 additions and 1 deletions
+6
View File
@@ -105,6 +105,12 @@ export class VersionService extends BaseService {
@OnEvent({ name: 'WebsocketConnect' })
async onWebsocketConnection({ userId }: ArgOf<'WebsocketConnect'>) {
this.websocketRepository.clientSend('on_server_version', userId, serverVersion);
const { newVersionCheck } = await this.getConfig({ withCache: true });
if (!newVersionCheck.enabled) {
return;
}
const metadata = await this.systemMetadataRepository.get(SystemMetadataKey.VersionCheckState);
if (metadata) {
this.websocketRepository.clientSend('on_new_release', userId, asNotification(metadata));