Hosted rooms phase 2: boots, invitations, favorites, ratings, live occupancy
CI / build (push) Successful in 36s

The client's own room actions work in hosted rooms, through the hub (t5de-hub's docs/hosted-rooms.md,
Phase 2): a "*boot" line goes to the room, then to the hub as room.boot; refused joins are declined as
the client's own are (booted ones as booted). Invitations: chat.attemptInvite polls the hub's answer,
and the invitee's client gets chatInvite on its user queue, accepting with the invite. Favorites
(favorite_rooms.php, add/removeFavoriteRoom, the favorites list), ratings (room_rating.php), the room
card's moderators, image and score, and room_occupancy queues fed from room.watch.

Web API parameters are read from JSON bodies too (imvu.http.securePost), and hosted rows added to an
empty IMVU list keep their flags numeric ("0" counted as set).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-10-30 06:30:42 -07:00
1 parent fc59367ba6
commit 210bc064e9
5 files changed
+629 -32

No files matched your search

+12 -4
View File
@@ -391,11 +391,18 @@ func (p *Products) Opened(c *proxy.IMQConn) {
// RefreshInventory has the client load its inventory again (after the library changed), with the server event
// IMVU sends after a purchase: "refreshInventory {}" on the user queue's ("/user/<id>") web_msg mount.
func (p *Products) RefreshInventory() {
if err := p.DeliverToUser("web_msg", []byte("refreshInventory {}")); err != nil {
p.logf("products: refreshing the inventory: %v", err)
}
}
// DeliverToUser gives the client a message on its own user queue (/user/<id>), as from the gateway.
func (p *Products) DeliverToUser(mount string, message []byte) error {
p.mu.Lock()
user := p.user
p.mu.Unlock()
if user == "" {
return
return nil
}
p.roomMu.Lock()
p.room.init()
@@ -404,10 +411,11 @@ func (p *Products) RefreshInventory() {
conns = append(conns, c)
}
p.roomMu.Unlock()
q := "/user/" + user
var last error
for _, c := range conns {
if err := c.Deliver(imq.Delivered{UserID: "0", Queue: q, Mount: "web_msg", Message: []byte("refreshInventory {}")}); err != nil {
p.logf("products: refreshing the inventory: %v", err)
if err := c.Deliver(imq.Delivered{UserID: "0", Queue: "/user/" + user, Mount: mount, Message: message}); err != nil {
last = err
}
}
return last
}