feat(server): add websocket events for activity changes

- Add 'activity.change' event to event repository
- Emit event when new activity (reaction/comment) is created
- Add notification handler to broadcast activity changes to relevant users
- Update frontend websocket types to include on_activity_change event
- Update tests to mock album repository calls
This commit is contained in:
Min Idzelis
2025-06-15 02:23:09 +00:00
parent 6f2f295cf3
commit a7559f0691
6 changed files with 54 additions and 13 deletions
+2 -1
View File
@@ -16,6 +16,7 @@ export interface ReleaseEvent {
export interface Events {
on_upload_success: (asset: AssetResponseDto) => void;
on_user_delete: (id: string) => void;
on_activity_change: (data: { albumId: string; assetId: string | null }) => void;
on_album_update: (data: { albumId: string; assetId: string[]; status: 'added' | 'removed' }) => void;
on_asset_person: ({
assetId,
@@ -27,7 +28,7 @@ export interface Events {
}) => void;
on_asset_delete: (assetId: string) => void;
on_asset_trash: (assetIds: string[]) => void;
on_asset_update: (asset: AssetResponseDto) => void;
on_asset_update: (assetIds: string[]) => void;
on_asset_hidden: (assetId: string) => void;
on_asset_restore: (assetIds: string[]) => void;
on_asset_stack_update: (assetIds: string[]) => void;