refactor: websocket repository (#23228)

This commit is contained in:
Jason Rasmussen
2025-10-24 16:26:27 -04:00
committed by GitHub
parent 65f29afb0f
commit 328380cfda
11 changed files with 176 additions and 147 deletions
+3 -3
View File
@@ -331,7 +331,7 @@ export class JobService extends BaseService {
const { id } = item.data;
const person = await this.personRepository.getById(id);
if (person) {
this.eventRepository.clientSend('on_person_thumbnail', person.ownerId, person.id);
this.websocketRepository.clientSend('on_person_thumbnail', person.ownerId, person.id);
}
break;
}
@@ -358,10 +358,10 @@ export class JobService extends BaseService {
await this.jobRepository.queueAll(jobs);
if (asset.visibility === AssetVisibility.Timeline || asset.visibility === AssetVisibility.Archive) {
this.eventRepository.clientSend('on_upload_success', asset.ownerId, mapAsset(asset));
this.websocketRepository.clientSend('on_upload_success', asset.ownerId, mapAsset(asset));
if (asset.exifInfo) {
const exif = asset.exifInfo;
this.eventRepository.clientSend('AssetUploadReadyV1', asset.ownerId, {
this.websocketRepository.clientSend('AssetUploadReadyV1', asset.ownerId, {
// TODO remove `on_upload_success` and then modify the query to select only the required fields)
asset: {
id: asset.id,