feat: synchronize account icons across game profiles

This commit is contained in:
Hide_D committed 2026-07-31 11:21:08 +00:00
1 parent c8adeeb47b
commit 5f20413552
87 files changed
+5755 -280

No files matched your search

@@ -0,0 +1,18 @@
import { resolveAccountIconProjection, type AccountIconProjection } from '@sammo-ts/common';
import type { UserRecord } from './userRepository.js';
export const resolveEffectiveAccountIcon = (
user: Pick<
UserRecord,
'createdAt' | 'picture' | 'imageServer' | 'iconUpdatedAt' | 'iconRevision' | 'profileIconResetAt'
>
): AccountIconProjection =>
resolveAccountIconProjection({
createdAt: user.createdAt,
picture: user.picture,
imageServer: user.imageServer,
...(user.iconUpdatedAt ? { iconUpdatedAt: user.iconUpdatedAt } : {}),
...(user.iconRevision ? { iconRevision: user.iconRevision } : {}),
...(user.profileIconResetAt ? { profileIconResetAt: user.profileIconResetAt } : {}),
});