Presence: count an account as soon as it's linked; accept an empty outfit
CI / test (push) Successful in 36s

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-10-29 05:07:28 -07:00
1 parent 7a06ba49c3
commit 339ba8e2d6
3 files changed
+45 -5

No files matched your search

+4 -1
View File
@@ -350,8 +350,10 @@ export function createApp({ db, auth, imvu, realtime: rt }: Deps) {
target: String(found.id),
detail: moved ? { imvu: found.username, movedFrom: prev!.userId } : { imvu: found.username },
});
return { link, moved };
return { link, moved, previousOwner: prev?.userId };
});
if (result.moved) realtime.unlinked(result.previousOwner!, found.id);
realtime.linked(me.id, found.id);
return { link: linkView(result.link), moved: result.moved };
},
{ signedIn: true, params: imvuIdParam },
@@ -403,6 +405,7 @@ export function createApp({ db, auth, imvu, realtime: rt }: Deps) {
async ({ me, params, set }) => {
const l = await ownLink(me, params.imvu);
await db.delete(imvuLink).where(eq(imvuLink.imvuId, l.imvuId));
realtime.unlinked(me.id, l.imvuId);
await audited(me.id, "link.remove", String(l.imvuId), { imvu: l.username });
set.status = 204;
},