Decorations over IMVU rooms: the hub's side
CI / test (push) Successful in 1m13s

T5 products placed in ordinary IMVU rooms, kept per room instance
(room_decoration, migration 0006). GET /api/v1/decorations/:instance (and
?instances= for up to 20) gives what the viewer may see, with a hash;
PUT is for the room owner's T5DE person only, checks the products exist,
and tells every realtime session with a chat in that room ({"type":
"decor"}). Hosted rooms' IDs are refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-10-30 03:58:42 -07:00
1 parent 2a1fc94df6
commit f65f36c1ea
12 files changed
+2325 -6

No files matched your search

+19
View File
@@ -361,3 +361,22 @@ export const hostedRoom = pgTable(
},
(t) => [index("hosted_room_owner").on(t.ownerId), index("hosted_room_created").on(t.createdAt)],
);
// ---- Decorations over IMVU rooms (docs/products.md, "Decorations") ----
/** A decoration: [furniture instance ID, hub product ID, placement], as the client's room_contents. */
export type DecorationItem = [number, string, string];
// T5 products placed in an IMVU room by its owner. IMVU keeps the room without them (T5DE's proxy strips them from
// what the client saves); the proxies of T5DE users in the room add them back. Hosted rooms keep theirs in
// hosted_room.scene instead.
export const roomDecoration = pgTable(
"room_decoration",
{
instanceId: text("instance_id").primaryKey(), // IMVU's room instance, "<owner>-<n>"
ownerImvuId: bigint("owner_imvu_id", { mode: "number" }).notNull(), // the number before the dash
contents: jsonb("contents").$type<DecorationItem[]>().notNull(),
updatedAt: updatedAt(),
},
(t) => [index("room_decoration_owner").on(t.ownerImvuId)],
);